When overwriting a file, TC forgets to delete it's comment

Please report only one bug per message!

Moderators: Stefan2, white, sheep, Hacker

Post Reply
User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

When overwriting a file, TC forgets to delete it's comment

Post by *m^2 » 2010-11-09, 17:31 UTC

1. Create files C:\1 and C:\2
2. Add some comment to C:\1
3. Rename C:\2 to C:\1
Result: The new C:\1 has a comment from the old one.

I'm not sure if it's an omission or was it designed this way, but nontheless it was unexpected and certainly not natural for me. I feel that a comment is bound to a file, not to it's name. And actually renaming the other way (C:\1 to C:\2) keeps the comment with file.

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 36255
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) » 2010-11-11, 16:15 UTC

By default, comments are not copied with files, except when you enable it in Configuration - Options - Operation - Copy comments with files.

Even then it only works when you don't use the Explorer copy or delete methods...
Author of Total Commander
http://www.ghisler.com

User avatar
m^2
Power Member
Power Member
Posts: 1413
Joined: 2006-07-12, 10:02 UTC
Location: Poland
Contact:

Post by *m^2 » 2010-11-11, 17:14 UTC

I should have mentioned it - I have TC configured this way.

User avatar
Balderstrom
Power Member
Power Member
Posts: 2148
Joined: 2005-10-11, 10:10 UTC

Post by *Balderstrom » 2010-11-11, 19:31 UTC

When file 1 exists, and file 2 overwrites it -- and file 2 has a comment as well as file 1.
I'd think the best/optimal behaviour would to provide the user a dialog to find out which comment is correct.

But the above is how it's always worked afaik, the comment is bound to the fileName, normally it would update the comment to match what the new fileName is.

Apparently that part of the comment-change code doesn't get triggered when the new-file-name overwrites an old file, and the old-file has a comment.

It also occurs, if you have Explorer mode enabled for delete. (the descript.ion doesn't update after delete)

Copy01.txt -> Comment: Copy01
Copy02.txt -> Comment: Copy02

Delete Copy01.txt
Now uncheck Explorer delete method, just in case.

Rename, Copy02.txt to Copy01.txt

Copy02.txt -> Comment: Copy01
*BLINK* TC9 Added WM_COPYDATA and WM_USER queries for scripting.

Post Reply