Improve support for editing R-O files inside archives (#2)

Here you can propose new features, make suggestions etc.

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Improve support for editing R-O files inside archives (#2)

Post by *MarcinW »

Consider the following situation:

1) we have an archive (say ZIP archive) containing a READ ONLY text file (file inside archive is R-O, not the archive itself)
2) enter into archive, select this file and press F4
3) file is being unpacked to TEMP dir (after confirming) and editor starts (notepad by default)
4) we can edit file, but we can't save it - file in TEMP dir gets the same attributes as in the archive (R-O in this case)
5) because we can't save the file with the original name, we don't get a message box: "The file xxx.txt has changed. Do you want to repack it into c:\test.zip?"

So we must save the file with other name and manually replace it in the archive.

Probably the simplest solution would be to clear R-O attribute of the temp file and set it again (if necessary) when moving file back to the archive.

Regards!
User avatar
MaxX
Power Member
Power Member
Posts: 1189
Joined: 2012-03-23, 18:15 UTC
Location: UA

Post by *MaxX »

And how can you imagine repacking of archives on optical drives? :lol:
They're R/O, too. But you can't change them directly due to ODD's abilities.
Ukrainian Total Commander Translator. Feedback and discuss.
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW »

@MaxX:

This post is NOT about R-O archives. It is about R-O files INSIDE archives. However:

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.
User avatar
MaxX
Power Member
Power Member
Posts: 1189
Joined: 2012-03-23, 18:15 UTC
Location: UA

Post by *MaxX »

MarcinW wrote:This post is NOT about R-O archives. It is about R-O files INSIDE archives.
Ah, sorry, missed that. Just saw similar title with "#2" mark and thought it is the same.
No more questions about, everything is good.
User avatar
MaxX
Power Member
Power Member
Posts: 1189
Joined: 2012-03-23, 18:15 UTC
Location: UA

Post by *MaxX »

MarcinW wrote:4) we can edit file, but we can't save it - file in TEMP dir gets the same attributes as in the archive (R-O in this case)
5) because we can't save the file with the original name, we don't get a message box: "The file xxx.txt has changed. Do you want to repack it into c:\test.zip?"
Just use AkelPad instead of default Windows' Notepad. AkelPad allows to edit and save R/O files without proglems, just turn on this feature in config dialog.
So, here's solution! :idea:
Post Reply