| View previous topic :: View next topic |
| Author |
Message |
MVV Power Member


Joined: 03 Aug 2008 Posts: 4599 Location: Russian Federation
|
Posted: Sat Mar 03, 2012 12:27 am Post subject: ZIP corruption on Esc during repacking on USB stick |
|
|
Reproduce:
1. Create some test ZIP and copy it to USB stick.
2. Add some file to it (not too small).
3. Press Esc during Rename/Move operation.
4. TC shows a message with no choice:
| Code: | ---------------------------
F:\TEMP\CMDE624.zip
---------------------------
User abort!
---------------------------
OK
---------------------------
|
5. Archive on a USB stick is now in corrupted state.
TC8b22x32
As I see, TC packs data to temp archive and then replaces original archive with updated one. But during regular copy operation I am able to cancel interruption and continue copying. But during repacking I have no chance to continue copying so I lost my archive completely (yes, I noticed that I can take it from temp folder, but it is not user-friendly operation). _________________ VirtualPanel plugin: Temporary panel for TC (forum)
TOTALCMD.NET: TCFS2, NTLinks, CopyTree, AskParam, ConPaste, Sudo…
Last edited by MVV on Sat Mar 03, 2012 2:25 am; edited 1 time in total |
|
| Back to top |
|
 |
Biozynotiker Junior Member

Joined: 22 Mar 2011 Posts: 98 Location: Germany
|
Posted: Sat Mar 03, 2012 1:25 am Post subject: |
|
|
I can confirm that ESC immediately stops the process,
but I cannot confirm that TC leaves a corrupt Zip archive.
TC always create a temporary "<filename>.zi#" during adding files on my tests,
so that the original archive stays untouched until the adding process is finished.
BTW: The temporary file was created in my tests on the target drive, not in the temp folder as you described
(so the copy process is in this case is a renaming process and is a way faster and its harder to interrupt)
All Tests done on beta 22 x86/x64. _________________ #92832 - I had never used a TC plugin in the past and I won't do it in the future. I'm proud of it. Period.
(Please don't take my English too serious, I know it is "sergeant" like!) |
|
| Back to top |
|
 |
MVV Power Member


Joined: 03 Aug 2008 Posts: 4599 Location: Russian Federation
|
|
| Back to top |
|
 |
Biozynotiker Junior Member

Joined: 22 Mar 2011 Posts: 98 Location: Germany
|
Posted: Sat Mar 03, 2012 1:59 am Post subject: |
|
|
I can now confirm the corruption on USB Stick.
I used a 64GB USB Stick before and this was maybe detected as HDD.
Now, with a 2GB stick, i can confirm it.
A confirmation dialog to abort the copy process should be added. _________________ #92832 - I had never used a TC plugin in the past and I won't do it in the future. I'm proud of it. Period.
(Please don't take my English too serious, I know it is "sergeant" like!) |
|
| Back to top |
|
 |
MVV Power Member


Joined: 03 Aug 2008 Posts: 4599 Location: Russian Federation
|
Posted: Sat Mar 03, 2012 2:20 am Post subject: |
|
|
Thanks, nice to hear that you've reproduced it.
In case of a regular copy I get following message on Escape:
| Code: | ---------------------------
Total Commander
---------------------------
User abort!
---------------------------
OK Cancel
---------------------------
|
I can cancel aborting by clicking Cancel.
So, TC should show Cancel button in that dialog too. And maybe even a warning that archive will be corrupted (because it is not just a regular copy but repack process that modifies an existing archive). _________________ VirtualPanel plugin: Temporary panel for TC (forum)
TOTALCMD.NET: TCFS2, NTLinks, CopyTree, AskParam, ConPaste, Sudo… |
|
| Back to top |
|
 |
Flint Power Member


Joined: 27 Oct 2003 Posts: 2868 Location: Moscow, Russia
|
Posted: Sun Mar 04, 2012 9:25 am Post subject: |
|
|
I confirm the problem, but I'm not sure what there is to do about it. I do agree that OK/Cancel dialog should be displayed instead of just OK, but in any case if you decide to abort a copy phase of the operation, the archive is already corrupted (being overwrited at the moment), so you can either remove the copied part of the file (as aborting of usual copy operation does) or keep the copied data. I'm not sure what's better. On the one hand, keeping some data is better than removing them completely. On the other hand, If TC keeps the part of the archive, the user might not notice that it changed and actually became corrupted.
Probably, in such situation TC should not only warn about corruption, but also tell the user where his/her original data are located (since this might happen to be the last available copy of some important data). I noticed that the temporary ZIP file is still present in the TEMP dir (under the CMD****.ZIP name), but very few users would guess this. Unfortunately, it would require a new translation, and it seems to be too late for it (line 1230 is close but doesn't quite fit the case). _________________ Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, other stuff!
Using TC 8.01 / Win7 x64 SP1 |
|
| Back to top |
|
 |
ghisler(Author) Site Admin


Joined: 04 Feb 2003 Posts: 24702 Location: Switzerland
|
Posted: Mon Mar 05, 2012 9:07 am Post subject: |
|
|
I cannot reproduce the problem, there is no Rename/Move step here. TC creates the temporary zip on the USB stick itself, then deletes the old zip and renames the new one. I get an out of memory error if there isn't the space for both the old and new zip. _________________ Author of Total Commander
http://www.ghisler.com |
|
| Back to top |
|
 |
Flint Power Member


Joined: 27 Oct 2003 Posts: 2868 Location: Moscow, Russia
|
Posted: Mon Mar 05, 2012 9:16 am Post subject: |
|
|
RemovableInTemp should be set to 1 to reproduce this problem. _________________ Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, other stuff!
Using TC 8.01 / Win7 x64 SP1 |
|
| Back to top |
|
 |
MVV Power Member


Joined: 03 Aug 2008 Posts: 4599 Location: Russian Federation
|
|
| Back to top |
|
 |
ghisler(Author) Site Admin


Joined: 04 Feb 2003 Posts: 24702 Location: Switzerland
|
Posted: Mon Mar 05, 2012 9:30 am Post subject: |
|
|
I see - so what do you suggest as a workaround? I can't prevent the data corruption when the user aborts the copying back of the temp file - the old zip has to be deleted to get the free space for the new... _________________ Author of Total Commander
http://www.ghisler.com |
|
| Back to top |
|
 |
MVV Power Member


Joined: 03 Aug 2008 Posts: 4599 Location: Russian Federation
|
|
| Back to top |
|
 |
Flint Power Member


Joined: 27 Oct 2003 Posts: 2868 Location: Moscow, Russia
|
Posted: Mon Mar 05, 2012 9:38 am Post subject: |
|
|
| MVV wrote: | | It is strange but I can reproduce it with default RemovableInTemp value. And even with clean INI. I have 8-GB Transcend USB flash. |
Hm… If it's set to zero, the moving stage is too fast to catch it. At least, I cannot reproduce the problem with RemovableInTemp=0 (and, consequently, with this key missing, since its default value is 0). _________________ Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, other stuff!
Using TC 8.01 / Win7 x64 SP1 |
|
| Back to top |
|
 |
MVV Power Member


Joined: 03 Aug 2008 Posts: 4599 Location: Russian Federation
|
|
| Back to top |
|
 |
Flint Power Member


Joined: 27 Oct 2003 Posts: 2868 Location: Moscow, Russia
|
Posted: Mon Mar 05, 2012 11:54 am Post subject: |
|
|
| MVV wrote: | | Try larger archive. |
Delete and rename operations depend very little on the file size. In addition, my flash stick is very fast and formatted as exFAT which also increases speed of file operations dramatically, so I cannot test it anyway. Maybe, on slow drives this delay would be noticable, but in any case I cannot see how an archive might become corrupted in this situation. You cannot stop TC operation in the middle of deleting or renaming, these both operations are controlled by OS, and from the TC's point of view they are atomic. _________________ Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, other stuff!
Using TC 8.01 / Win7 x64 SP1 |
|
| Back to top |
|
 |
MVV Power Member


Joined: 03 Aug 2008 Posts: 4599 Location: Russian Federation
|
Posted: Mon Mar 05, 2012 1:44 pm Post subject: |
|
|
Flint, as I described above, I add a file into ZIP on a USB stick. TC creates modified archive in a temp folder and then copies it instead of original one. If you press Esc during that copying, archive will be left in damaged state.
I don't perform such operations frequently (in fact, I'm using 7Z and CAB archives usually) but TC should allow to continue process after false Escape if it shows some message. _________________ VirtualPanel plugin: Temporary panel for TC (forum)
TOTALCMD.NET: TCFS2, NTLinks, CopyTree, AskParam, ConPaste, Sudo… |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|