Author Topic: v14.0 BETA  (Read 30817 times)

Mathias (Author)

  • Administrator
  • VIP Member
  • *****
  • Posts: 4492
    • View Profile
    • Multi Commander
Re: v14.0 BETA
« Reply #25 on: June 20, 2024, 14:54:38 »
when checking if file exists the GetFileAttributes(..) API is used. But for the special system files it return false and set error code to FILE_NOT_FOUND.

I tried PathFileExists(). For non-existing file it returns 0x02 FILE_NOT_FOUND while for "hiberfil.sys" it returns 0x20 ERROR_SHARING_VIOLATION. Also FindFirstFile() succeedes.

It looks inconsistent when you see a file in the panel, but script says it doesn't exist.
Yes some Windows API report  NOT FOUND and some SHARING VIOLATION..
Its only for some very special system files. Not sure it is worth the time to create some workaround just for them.

Jungle

  • Contributor
  • VIP Member
  • *****
  • Posts: 556
  • Old Skull
    • View Profile
Re: v14.0 BETA
« Reply #26 on: June 20, 2024, 15:44:51 »
Yes some Windows API report  NOT FOUND and some SHARING VIOLATION..
Its only for some very special system files. Not sure it is worth the time to create some workaround just for them.
Let FileExists() and others return:
* 1 when GetFileAttributes returns true
* 0 when GetFileAttributes returns false and FILE_NOT_FOUND
* 2 (or -1 or whatever else) otherwise

It will guarantee file existence or absence

User_99

  • Active Member
  • ***
  • Posts: 84
    • View Profile
Re: v14.0 BETA
« Reply #27 on: June 21, 2024, 22:49:32 »
Hi Mathias,

thx for update.
Translation strings all fine. Great work...