This forum has been archived. All content is frozen. Please use KDE Discuss instead.

KTorrent deleted all of my shared files!!! [SOLVED]

Tags: None
(comma "," separated)
J
Registered Member
Posts
86
Karma
0
Altogether I lost 31 GB of files, which i've been downloading for many months. I'm not very happy. :(

Steps to reproduce:
1) mkdir some_dir; echo some extremely important data > some_dir/important_file
2) Using ktorrent-2.0beta1, make sure the partfileimportplugin is loaded
3) File -> Import existing download
4) specify a torrent containing multiple files
5) specify some_dir as "Data"
6) click import
7) make sure it starts to download (is on the downloads tab)
8) remove it
9) when it asks you whether to delete incomplete data, choose Yes.

Result:
some_dir and ALL of its contents are removed! Not a pretty thing on a filesystem on which undeletion is practically impossible.

Last edited by J on Thu Jul 20, 2006 3:38 pm, edited 1 time in total.
stoeptegel
Registered Member
Posts
1075
Karma
0

Sun Jul 09, 2006 4:18 pm
This looks to me like there was rehashed a folder with a torrent which was not made for this folder/data. When you do this, the data will be lost.
J
Registered Member
Posts
86
Karma
0

Sun Jul 09, 2006 5:23 pm
stoeptegel wrote:This looks to me like there was rehashed a folder with a torrent which was not made for this folder/data. When you do this, the data will be lost.


I'm not quite sure I understand.

From the users stance. Suppose one wants to import a completely downloaded share and accidentally specifies an incorrect directory. First, the torrent shows up on the uploads tab. When KTorrent discovers that the files do not exist, the torrent is moved to the download tab. The user notices that the torrent, that he thinks should be uploading, is instead on the download tab. The user removes the torrent. KTorrent asks the user whether to delete the incomplete files. User logic follows: the incomplete files KTorrent specifies must therefore be something KTorrent itself has created. Therefore the user clicks Yes, presuming KTorrent will only delete those incomplete files, it has created. Instead, without any warning, the results may be (in my case, were) quite disasterous.

I'd reccommend KTorrent not to delete (data) files it did not create, or at minimum list all the files and directories, which would be deleted.
Moshroum
Registered Member
Posts
63
Karma
0

Sun Jul 09, 2006 5:53 pm
Sounds quite good. KTorrent shouldnt delete the whole dir, but delete all files in the dir (and if empty) the directory.
But showing the files/directories which will be deleted (like the kde delete dialog) is also not wrong.
stoeptegel
Registered Member
Posts
1075
Karma
0

Sun Jul 09, 2006 6:39 pm
Ow now is see, you imported a torrent from a folder which had many more childrens, but the torrent somehow failed the hashes in the torrent.
So you removed the torrent afterwards, not knowing it would remove ALL the childrens.

IIRC removing the childrens (after a confirmation) is normal in all clients at the moment. But an extra check option(if there are children outside the normal torrent) for this sounds good to me, me likes the last idea of Moshroum.

On the other hand, i don't see a reason why one would have saved different files in a folder other than the original torrent files.
George
Moderator
Posts
5421
Karma
1

Mon Jul 10, 2006 7:29 am
We should remove only the files and empty directories.

EDIT: Now we only remove directories part of the torrent, and only if they are empty
J
Registered Member
Posts
86
Karma
0

Thu Jul 20, 2006 3:37 pm
George wrote:EDIT: Now we only remove directories part of the torrent, and only if they are empty


Thanks! :)

RC1 has improved a lot!
podarok
Registered Member
Posts
17
Karma
0

Multiple delete vulnerabilities

Thu Jul 27, 2006 9:54 am
system FreeBSD
ktorrent version - svn(the same on beta)

1 - Torrent with many files inside - when select-deselect any file after it was downloaded(at the "files" tab) as result - file(s) deleted without any question
2 - After importing existing download when existing file(s) are not equal with torrent one there are no possibility to delete torrent from download panel without killing files from disk - any try to delete - files killed 8((((
(as for me I use special flags for any of imported files that give me possibility not delete by any user any of file)

With this bugs I kill many gigabytes of downloaded and not only downloaded but badly imported files into ktorrent, so it will be very nice to see confirmation dialogs for every and every file on the disk when removing from download list, selecting any of file at "files" tab and so on

PS. Sorry for my English


Andriy Podanenko
PAK-UANIC
George
Moderator
Posts
5421
Karma
1

Re: Multiple delete vulnerabilities

Thu Jul 27, 2006 4:42 pm
podarok wrote:system FreeBSD
ktorrent version - svn(the same on beta)

1 - Torrent with many files inside - when select-deselect any file after it was downloaded(at the "files" tab) as result - file(s) deleted without any question


Maybe you are right, and we should add a confirmation dialog.

2 - After importing existing download when existing file(s) are not equal with torrent one there are no possibility to delete torrent from download panel without killing files from disk - any try to delete - files killed 8((((
(as for me I use special flags for any of imported files that give me possibility not delete by any user any of file)


When you remove a torrent, KT will ask you if you want to remove the data (if the torrent is not fully downloaded). If you select no, the files should be untouched.
snap
Registered Member
Posts
20
Karma
0

Thu Jul 27, 2006 5:35 pm
@George: would it be a good idea to add a option not to delete files at all if you deselect them? I wanted one time deselect some files to force the download only to download chunks fpr a specific file, because the option to set the file download priority was not enough for me.

Is it possibly to prevent the deletion of chunks, which get downloaded at the moment if you deselect files?
podarok
Registered Member
Posts
17
Karma
0

Re: Multiple delete vulnerabilities

Thu Jul 27, 2006 5:59 pm
George wrote:When you remove a torrent, KT will ask you if you want to remove the data (if the torrent is not fully downloaded). If you select no, the files should be untouched.

I said about
1 - we have torrent file
2 - we have some data that we want to upload via some tracker(from what we get number 1)
3 - Import existing download
4 - tracker data and our file are not equal(different at all) and we get 0% download torrent(but we only want to upload data not to download)
5 - we want to delete torrent from download window(push remove)
6 - as result - our file(data) that is needed for us - deleted 8((( and of couse - without any confirmation


Andriy Podanenko
PAK-UANIC
George
Moderator
Posts
5421
Karma
1

Fri Jul 28, 2006 4:32 pm
snap wrote:@George: would it be a good idea to add a option not to delete files at all if you deselect them? I wanted one time deselect some files to force the download only to download chunks fpr a specific file, because the option to set the file download priority was not enough for me.

Is it possibly to prevent the deletion of chunks, which get downloaded at the moment if you deselect files?


Not possible at the moment, and seeing that it requires GUI changes, we can't add this to the 2.0 release. Obviously you can make a backup of the file(s) in question, and then deselect them.
podarok
Registered Member
Posts
17
Karma
0

Fri Jul 28, 2006 5:58 pm
thee are no variants to backup all files 8((
and select deselect make very often not specialy but when want to make preview 8(((( and so lost the data


Andriy Podanenko
PAK-UANIC


Bookmarks



Who is online

Registered users: Bing [Bot], Evergrowing, Google [Bot]