ghisler(Author) wrote:This has been added to beta 12 now.
Thanks! Works flawlessly, 32/64 bit. And file permission was intact.
(CompareDeleteBak=1)
Tested: compare/edit *.bak files also works (file.bak -> file.bak.bak)
Note: *.bak file is treated as a new, different file which inherited parent folder permission.
If original file has a different permission, only original (edited) file gets back the original permisson. Clever.
Is it done automatically or TC has to do some workaround?
(CompareDeleteBak=0)
On second thought I guess this is what MVV talked about:
MVV wrote:...one last backup files in temp folder...
...TC fails to save changes at bak creation stage...
...e.g. I have write-protected folder where only some files have full permissions...
I'm not sure if what MVV was suggesting is what I think it is, but I'll try to elaborate some... Good suggestion nevertheless, but I think real-world implementation would involve some more work to be done during the process.
Example:
1.
C:\Share\ (admins, operators, local users: rw. guest, everyone: ro)
2.
C:\Share\example.txt (everyone: rw)
3. Say I'm guest. Now if I put the temporary example.txt in my own
%TEMP% it would be "owner:guest" Now after editing, put back into
C:\Share. Guess what would happen?
Question: When should TC read the file permission?
a) When initially copying
C:\Share\example.txt, read its permission and copy it to my
%TEMP% (I'm no admin, so NTFS permissions as permitted to me only). Can be bad actually, say my
%TEMP% is a FAT32 drive... (ramdrive, pendrive etc)
b) Same as above, but instead of copying, save the permission in program memory until the file is written back. (Could work, I think)
c) When copying from
%TEMP% to
C:\Share, read the (original,
C:\Share\example.txt) permission and set the (newly copied file) permission accordingly. I think this method might also work.
Come to think of it, in long run the %TEMP% copy method might be better solution VS current *.bak method. But that's my opinion. YMMV.