Ovewriting file from corrupted RAR-archive
Moderators: Hacker, petermad, Stefan2, white
Ovewriting file from corrupted RAR-archive
1. Download Total Commander 7.50 beta 6.
2. Pack tcmd75b6.exe to tcmd75b6.rar (2 581 688 bytes).
3. Split tcmd75b6.rar with size of first piece = 2 Mb.
4. Rename tcmd75b6.001 to tcmd75b6.rar.
Now tcmd75b6.rar - is example of corrupted archive.
1. Enter in corrupted tcmd75b6.rar.
2. Try to overwrite existed tcmd75b6.exe on your computer by tcmd75b6.exe from corupted archive.
3. TC say: "Error in packed file tcmd75b6.rar [OK] [Cancel]"
4.1. If you pres "OK" - tcmd75b6.exe will deleted.
4.2. If you pres "Cancel" - tcmd75b6.exe will also deleted.
5. And now you lost your file tcmd75b6.exe.
2. Pack tcmd75b6.exe to tcmd75b6.rar (2 581 688 bytes).
3. Split tcmd75b6.rar with size of first piece = 2 Mb.
4. Rename tcmd75b6.001 to tcmd75b6.rar.
Now tcmd75b6.rar - is example of corrupted archive.
1. Enter in corrupted tcmd75b6.rar.
2. Try to overwrite existed tcmd75b6.exe on your computer by tcmd75b6.exe from corupted archive.
3. TC say: "Error in packed file tcmd75b6.rar [OK] [Cancel]"
4.1. If you pres "OK" - tcmd75b6.exe will deleted.
4.2. If you pres "Cancel" - tcmd75b6.exe will also deleted.
5. And now you lost your file tcmd75b6.exe.
Re: Ovewriting file from corrupted RAR-archive
Of course, you lost your file. Because your archive doesn't contain information for unpacking this file. This stuff has place with ANY archive type. I don't see something strange in it.bbutcher wrote:5. And now you lost your file tcmd75b6.exe.
When you choose OVERWRITE a file on your computer, ANY software will: 1. remove old file; 2. place new file. If operation 2 fails, NO ONE can undo operation 1 (only with recovery software).
Another question - why TC always deletes corrupted unpacked file. I understand, that this file can't be used because of corruption, but may be I want to do something with unpackable part of file.
- Boofo
- Power Member
- Posts: 1431
- Joined: 2003-02-11, 00:29 UTC
- Location: Des Moines, IA (USA)
- Contact:
Re: Ovewriting file from corrupted RAR-archive
Exactly! Why would anyone attempt something like this, anyway?MVV wrote:Of course, you lost your file. Because your archive doesn't contain information for unpacking this file. This stuff has place with ANY archive type. I don't see something strange in it.bbutcher wrote:5. And now you lost your file tcmd75b6.exe.
chmod a+x /bin/laden -- Allows anyone the permission to execute /bin/laden
How do I un-overwrite all my data?
User of Total Commander
#60471 Single user license
How do I un-overwrite all my data?
User of Total Commander
#60471 Single user license
If you mean TC750b6.exe, of course, I can redownload it . But that file was only example.Samuel wrote:You may redownload it
Imagine such situation. You download archive of new version of any file, but archive with it is corrupted on server. You try to renew old version of your file on local computer by new version from archive, but you lost your file. And you cannot restore it, because you can only download corrupted archive from server.
Last edited by bbutcher on 2009-06-30, 07:31 UTC, edited 2 times in total.
Re: Ovewriting file from corrupted RAR-archive
I don't want to delete file, I want to overwrite it by file from archive. Imho, in overwriting operations TC must check integrity of file in archive before deleting target file on local computer.MVV wrote:Of course, you lost your file. Because your archive doesn't contain information for unpacking this file. This stuff has place with ANY archive type. I don't see something strange in it.
- fenix_productions
- Power Member
- Posts: 1979
- Joined: 2005-08-07, 13:23 UTC
- Location: Poland
- Contact:
2bbutcher
Your request is little problematic because described situation does not happen for archives only!
Try this:
1. copy big file from right panel to left one,
2. wait for finish,
3. copy it once again and agree to Overwrite,
4. while copying cancel whole process.
You'll see that even now file gets deleted. This also happens on move.
Your request means checking for every possible situation: not only for packing/unpacking or copying / moving! There are much more situations when it can happen. Please, do not forget any network (either FTP or even LAN) operations. Trying to prevent each one of them without loosing TC speed is impossible. TC can't protect you from all of them.
The only way to avoid such errors would be to copy / unpack files temporary somewhere and if everything seems to be OK, replace what you want but this solution would be slow as hell.
On the other hand, described behaviour does not differ from any other application: if you want to save a file and something bad happens during the process, you'll gain either corrupted file or nothing at all. This is not TC only bug but the way how it works in general.
The only part of this thread I can agree is to have the possibility to save unpacked files even if they are damaged (WinRAR can do that).
Your request is little problematic because described situation does not happen for archives only!
Try this:
1. copy big file from right panel to left one,
2. wait for finish,
3. copy it once again and agree to Overwrite,
4. while copying cancel whole process.
You'll see that even now file gets deleted. This also happens on move.
Your request means checking for every possible situation: not only for packing/unpacking or copying / moving! There are much more situations when it can happen. Please, do not forget any network (either FTP or even LAN) operations. Trying to prevent each one of them without loosing TC speed is impossible. TC can't protect you from all of them.
The only way to avoid such errors would be to copy / unpack files temporary somewhere and if everything seems to be OK, replace what you want but this solution would be slow as hell.
On the other hand, described behaviour does not differ from any other application: if you want to save a file and something bad happens during the process, you'll gain either corrupted file or nothing at all. This is not TC only bug but the way how it works in general.
The only part of this thread I can agree is to have the possibility to save unpacked files even if they are damaged (WinRAR can do that).
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...
#128099
#128099
Deleting is the first step of overwriting. If you wanna check integrity, you should do this (Alt+Shift+F9). Or you should use button 'More Options' in overwrite dialog and check there an option 'Auto-rename target files' - then your original file will be renamed instead of deleting.bbutcher wrote:I don't want to delete file, I want to overwrite it by file from archive. Imho, in overwriting operations TC must check integrity of file in archive before deleting target file on local computer.
It is slow not always - rename/move operation within logical disk is quick, so if we place new file on the disk where old file is placed (or in the same dir), remove old file and move new file, it won't be too slow.fenix_productions wrote:The only way to avoid such errors would be to copy / unpack files temporary somewhere and if everything seems to be OK, replace what you want but this solution would be slow as hell.
- fenix_productions
- Power Member
- Posts: 1979
- Joined: 2005-08-07, 13:23 UTC
- Location: Poland
- Contact:
So we've got one operation from many but this is still not unpacking as first post stated.MVV wrote:It is slow not always - rename/move operation within logical disk is quick, so if we place new file on the disk where old file is placed (or in the same dir), remove old file and move new file, it won't be too slow.
Even if we agree that files can be unpacked elsewhere and moved to desired location if everythig seems to be OK, we can't exclude deleting part. Files needs to be deleted before replacement and this is the step when something can broke. Even if I exaggerate, we still need twice as much space as with current way.
"When we created the poke, we thought it would be cool to have a feature without any specific purpose." Facebook...
#128099
#128099
Ok, let do rename of original file at first (instead of deleting), and unpacking or something else at second. But this needs only in rare cases. And TC can do it - this is the main point.fenix_productions wrote:So we've got one operation from many but this is still not unpacking as first post stated.
Even if we agree that files can be unpacked elsewhere and moved to desired location if everythig seems to be OK, we can't exclude deleting part. Files needs to be deleted before replacement and this is the step when something can broke. Even if I exaggerate, we still need twice as much space as with current way.
- fenix_productions
- Power Member
- Posts: 1979
- Joined: 2005-08-07, 13:23 UTC
- Location: Poland
- Contact:
I think Total Commander must protect target-files during overwriting operations (via checking integrity or making temporal backups).
Source-files can be damaged (corrupted archives, scratched CDs, bad-blocks on HDD etc.) and deleting of target-file during such interrapted-overwriting is very dangerous behaviour.
Source-files can be damaged (corrupted archives, scratched CDs, bad-blocks on HDD etc.) and deleting of target-file during such interrapted-overwriting is very dangerous behaviour.
Re: Ovewriting file from corrupted RAR-archive
Why not 3 steps?MVV wrote:When you choose OVERWRITE a file on your computer, ANY software will: 1. remove old file; 2. place new file. If operation 2 fails, NO ONE can undo operation 1.
1. Copy source file to "filename.ext.tmp", or to TEMP-folder, or to RAM etc.
2. Delete target-file
3. Restore source file.
I consider, if user want erase files, he will delete its. But in case overwriting files, he wants to RENEW these files. Why he must risk one's files?
Re: Ovewriting file from corrupted RAR-archive
I repeat one of my previous posts in this topic:bbutcher wrote: I consider, if user want erase files, he will delete its. But in case overwriting files, he wants to RENEW these files. Why he must risk one's files?
MVV wrote:Or you should use button 'More Options' in overwrite dialog and check there an option 'Auto-rename target files' - then your original file will be renamed instead of deleting.
- ghisler(Author)
- Site Admin
- Posts: 49100
- Joined: 2003-02-04, 09:46 UTC
- Location: Switzerland
- Contact:
I will check whether Total Commander itself deletes the file, or the packer (WinRAR). In the first case, I will change it so the file isn't deleted. In the second case, I cannot do anything...
Author of Total Commander
https://www.ghisler.com
https://www.ghisler.com