Consider the following situation:
1) we have a READ ONLY archive (say ZIP archive) containing text file(s)
2) enter into archive, select any file and press F4
3) file is being unpacked to TEMP dir (after confirming) and editor starts (notepad by default)
4) edit file, save it and close notepad
5) now TCMD displays message box: "The file xxx.txt has changed. Do you want to repack it into c:\test.zip?"
6) after pressing "Yes", TCMD displays message box: "Error: Cannot write c:\test.zip! Please remove the write protection!"
Now the only way to recover our edited file contents is to go manually to the TEMP directory and find a proper file.
So my suggestion is: use the solution already existing - as when overwriting an read-only file (when copying/moving): instead of displaying "Error: Cannot write c:\test.zip! Please remove the write protection!", display: "The file c:\test.zip is READ ONLY! Do you want to overwrite it anyway?".
Regards!
Improve support for editing files inside R-O archives
Moderators: Hacker, petermad, Stefan2, white
2MarcinW
Better decision is asking about R/O archive BEFORE editing.
Just like this:
1. Enter R/O zip
2. press "F4"
3. msg. "arch is R/O, continue? y/n"
And then you decide - you wish to lose later changes or not.
Better decision is asking about R/O archive BEFORE editing.
Just like this:
1. Enter R/O zip
2. press "F4"
3. msg. "arch is R/O, continue? y/n"
And then you decide - you wish to lose later changes or not.
Ukrainian Total Commander Translator. Feedback and discuss.
I support that TC should offer to pack and repack write protected archives.
License #524 (1994)
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
Danish Total Commander Translator
TC 11.55rc4 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1393a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
There is also some inconsistency between copying/moving files and editing contents of an archive:
copying/moving:
1) when replacing HIDDEN or SYSTEM file -> "The file x has either the attribute HIDDEN or SYSTEM! Do you want to overwrite it anyway?"
else
2) when replacing READ-ONLY file -> "The file x is READ ONLY! Do you want to overwrite it anyway?"
else
overwrite without any further warnings
editing contents of an archive:
HIDDEN and SYSTEM attributes of an archive are completely ignored - no errors or warnings. Only the READ-ONLY generates an error. In my private opinion, it should be exactly as when copying/moving.
P.S.
Exactly same behavior (as when editing file inside a R-O archive) is when simply replacing a file in a R-O archive (using F5/F6).
copying/moving:
1) when replacing HIDDEN or SYSTEM file -> "The file x has either the attribute HIDDEN or SYSTEM! Do you want to overwrite it anyway?"
else
2) when replacing READ-ONLY file -> "The file x is READ ONLY! Do you want to overwrite it anyway?"
else
overwrite without any further warnings
editing contents of an archive:
HIDDEN and SYSTEM attributes of an archive are completely ignored - no errors or warnings. Only the READ-ONLY generates an error. In my private opinion, it should be exactly as when copying/moving.
P.S.
Exactly same behavior (as when editing file inside a R-O archive) is when simply replacing a file in a R-O archive (using F5/F6).
Problem with read-only attribute is that OS prevents file modifications (and its deletion) until it has this attribute, so it is necessary to remove it before opening a file for writing. Other attributes have no such power.
I agree that TC should warn if user tries to edit a file in read-only archive.
I agree that TC should warn if user tries to edit a file in read-only archive.
@MaxX:
There is no problem with CD/DVD drives.
When we want to replace a file with the R-O attribute (using F5/F6), there is a warning: "The file x is READ ONLY! Do you want to overwrite it anyway?".
Now there are two possibilities:
1) file is being replaced
2) file is on the CD/DVD drive - we get a warning: "Error: Cannot write X! Please remove the write protection!".
Same behavior can be implemented for R-O archives.
There is no problem with CD/DVD drives.
When we want to replace a file with the R-O attribute (using F5/F6), there is a warning: "The file x is READ ONLY! Do you want to overwrite it anyway?".
Now there are two possibilities:
1) file is being replaced
2) file is on the CD/DVD drive - we get a warning: "Error: Cannot write X! Please remove the write protection!".
Same behavior can be implemented for R-O archives.