Compare by content edit, attributes of changed file are lost

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Compare by content edit, attributes of changed file are lost

Post by *DrShark »

Situation: sometimes I use TC's "Compare by content" to compare and edit
descript.ion files.

The issue is that it doesn't seem to be really editing here:
Commander's CBC tool in editing mode backs up file I want to edit, adding .bak ext,
then creates its copy with original name and opens it for editing.
But new file don't have attributes and NTFS rights of original file.

Although it seems that the current behaviour is intentional,
for me expected and right behaviour would be keeping attributes and,
when possible, NTFS rights of original file.
Last edited by DrShark on 2015-11-02, 07:48 UTC, edited 2 times in total.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

By default TC makes a copy with .BAK extension and works with the file itself so attributes are preserved (e.g. NTFS index and hard copies). Maybe you've set CompareSaveOriginal to 0?
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

2MVV
By default TC makes a copy with .BAK extension and works with the file itself so attributes are preserved (e.g. NTFS index and hard copies). Maybe you've set CompareSaveOriginal to 0?
I don't have CompareSaveOriginal setting in wincmd.ini, so TC should work by default (like when set to 1). Simple check with descript.ion editing shows TC doesn't save regular attributes like "hidden" (NTFS attiributes are saved, indeed. I'll report in separate topic if I'll find some problems with it).

Help says in second case with CompareSaveOriginal=0 editing is done in different way, using filename.tmp, but regular attributes don't saved too.

Anyway I think default behviour should preserve maximum set of attributes, and additional modes can regulate the balance between quick file saving ("The file has to be written only once") and original attributes preserving.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48079
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

When you save a file in compare tool which has hidden or system attribute, TC will show a warning. The attributes will be removed to save the file.
Author of Total Commander
https://www.ghisler.com
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

ghisler(Author)
Why they are removed? How "Hidden" attribute can prevent TC from saving file? And if hidden or system file saved successfully, why not to try to re-set lost attributes?
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Post Reply