TC can't modify dates for junctions

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
skit
Junior Member
Junior Member
Posts: 4
Joined: 2015-04-25, 11:15 UTC

TC can't modify dates for junctions

Post by *skit »

TC 8.50 can't modify dates for junctions via standart TC "Change attributes" dialog.

I already wrote about it in Suggestions (please apologize me about repeating), but it seems it is really a bug.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48093
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

It's a misfeature of Windows: When you use SetFileAttributes on a junction, Windows changes the attributes of the target instead.
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Wait, attribute setting works fine for junction: e.g. if I set it read-only, it becomes read-only (icons from desktop.ini appear).

But timestamp setting doesn't work. There is an inconsistency: you set timestamp using one method but you get it then using another method (timestamp set for junction isn't shown for that junction). I think you can try opening junction handle with FILE_FLAG_OPEN_REPARSE_POINT flag for setting timestamp for junction itself.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48093
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Yes, TC just opens the file/folder, sets the timestamp, and closes it.
Author of Total Commander
https://www.ghisler.com
skit
Junior Member
Junior Member
Posts: 4
Joined: 2015-04-25, 11:15 UTC

Post by *skit »

So is there no way to bend this misfeature?
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

As I said, opening junctions with FILE_FLAG_OPEN_REPARSE_POINT flag should help.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48093
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This has been fixed in TC 8.52 beta 1, please test it!
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

Works as expected in 8.52b1, thank you!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48093
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Great, thanks!
Author of Total Commander
https://www.ghisler.com
Post Reply