I think, this is a common problem of overwriting procedure.ghisler(Author) wrote: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...
If operation of overwriting is interrupted (user clicked on “Cancel” or problem with unread source-file - scratched CD/DVD, bad-blocks on HDD/FDD/Flash, corrupted archive etc.) target file will deleted.
Feasible solution:
1. TC ask: “Overwrite file?”. User select “Overwrite!”.
2. TC check free space in this folder.
2.1. If free space is enough:
2.1.1. Rename target-file (for example, “filename.ext” to “filename.ext.tmp”)
2.1.2. Copy source file.
2.1.3. If operation successful – delete target file, if not – restore it.
2.2. If free space is not enough (use standard overwriting operation):
2.2.1. Delete target file.
2.2.2. Copy source file.
P.S. For example, TC can do such safe overwriting only for potential defected sources (archives, CD/DVDs and FDD).