jianlinwei / theunarchiver

Automatically exported from code.google.com/p/theunarchiver
Other
0 stars 0 forks source link

Remove file if the extraction failed [patch] #633

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If the extraction of a file fails, I think it should be deleted, since it 
probably won't be valid. It just takes space and when you are browsing the 
folder you want to only see the correct files.
Probably it may be better to just remove in some errors (like the password 
error (the file is empty)).

Original issue reported on code.google.com by jaimem...@gmail.com on 4 Feb 2013 at 6:15

Attachments:

GoogleCodeExporter commented 9 years ago
Since an incorrect password can cause an error, this behaviour will stay as it 
is.

Original comment by paracel...@gmail.com on 4 Feb 2013 at 6:30

GoogleCodeExporter commented 9 years ago
But, what's the point of having empty files?

Original comment by jaimem...@gmail.com on 4 Feb 2013 at 6:32

GoogleCodeExporter commented 9 years ago
Oh, I thought this was about the delete-archive-after-extraction option. Failed 
files should always be deleted if you click cancel, and always be kept if you 
press continue. If there is some case where either does not happen, that is a 
bug.

Failed files are kept when you click continue because they may be partially 
extracted and still useful.

Original comment by paracel...@gmail.com on 4 Feb 2013 at 6:46

GoogleCodeExporter commented 9 years ago
Ok, but I've been testing with a zip file with password and when the password 
is wrong it just creates an empty file. It has just one file, but you can 
imagine a zip with more protected files, extracting on your desktop without 
creating a root folder, it would fill your desktop with files that cannot be 
used for anything, and you will have to delete them manually.

Original comment by jaimem...@gmail.com on 4 Feb 2013 at 6:57

GoogleCodeExporter commented 9 years ago
The tested zip doesnn't produce a bug, it has one protected file and other file 
with no password. So the last one extracts, but the other is empty.

Original comment by jaimem...@gmail.com on 4 Feb 2013 at 6:59

GoogleCodeExporter commented 9 years ago
My point is that the file should be removed when the password is wrong.

Original comment by jaimem...@gmail.com on 4 Feb 2013 at 6:59

GoogleCodeExporter commented 9 years ago
But are you pressing "Stop" or "Continue"?

Original comment by paracel...@gmail.com on 4 Feb 2013 at 7:06

GoogleCodeExporter commented 9 years ago
Continue (on the unarchiver).
I understand that if I don't want to have the empty files I should press stop, 
but if I don't know the password it would be good to just extract the rest of 
files.

Original comment by jaimem...@gmail.com on 4 Feb 2013 at 7:48

GoogleCodeExporter commented 9 years ago
I don't really see a situation where the current behavior isn't sufficient. 
It's also quite consistent, so I don't really want to change it without good 
reason.

Original comment by paracel...@gmail.com on 4 Feb 2013 at 8:03

GoogleCodeExporter commented 9 years ago
Understood

Original comment by jaimem...@gmail.com on 4 Feb 2013 at 8:04