"Load from file under cursor" fails for files excl

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

Moderators: white, Hacker, petermad, Stefan2

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

"Load from file under cursor" fails for files excl

Post by *MarcinW »

The problem can be reproduced for files like pagefile.sys or hiberfil.sys, that are opened for exclusive access by the operating system (so we can't view them with Lister).

Test 1:
1) go to any "normal" file, like "c:\Program Files\Total Commander\TOTALCMD.EXE"
2) launch "Files -> Change Attributes"
3) press "From active panel (source) (1)" button
4) date, time and attributes don't change - this is as expected, they just have been read from the same file again

Test 2 a:
1) go to "c:\pagefile.sys"
2) launch "Files -> Change Attributes"
3) press "From active panel (source) (1)" button
4) date and time don't change, but all the attributes are cleared (although pagefile.sys has AHS set)

Test 2 b:
1) go to "c:\pagefile.sys"
2) press Tab and go to any file
3) launch "Files -> Change Attributes"
4) press "From target (2)" button
5) date and time are set as in "c:\pagefile.sys", but all the attributes are cleared (although pagefile.sys has AHS set)

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

Post by *ghisler(Author) »

Confirmed, thanks.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

The problem was that c:\pagefile.sys cannot be opened for reading, so GetFileAttributes cannot be called since it needs an open file handle. I will use FindFirstFile if I cannot open the file.
Author of Total Commander
https://www.ghisler.com
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW »

Great! The example with pagefile.sys was a bit artificial, but the same problem could occur also for any other file, when exclusively opened by any application.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This should be fixed now in beta 6, please test it!
Author of Total Commander
https://www.ghisler.com
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW »

Fixed, thanks!
Post Reply