[SHELL32]
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sat, 9 Jul 2016 23:18:39 +0000 (23:18 +0000)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sat, 9 Jul 2016 23:18:39 +0000 (23:18 +0000)
commit7e912fee22a64295378237caec2da4d5af1a452a
treef06db8a342b47d8b52219492d82f8a58a9d9358a
parent7795699eaa369ffc19df3fed079f6b60fb80f836
[SHELL32]
- Fix the last parameter of a StringCchCopyEx call; fix a misspelling.
- Do not exclusively use GetFileAttributesEx to retrieve file attributes (for the file properties dialog). Indeed, it happens that this API (as well as GetFileAttributes), and equivalently, NtQueryFullAttributesFile (as well as NtQueryAttributesFile), can fail on *locked system* files (on Win2k/Win2k3/Win7, and on ROS), such as C:\pagefile.sys . See for example http://stackoverflow.com/questions/16772931/getfileattributes-on-locked-system-file and my comment in CORE-10757 . Therefore to retrieve file attributes also for these files we do a trick: we call FindFirstFile on the full path to said file. It happens that FindFirstFile can work on locked system files, and thus we are able to retrieve their attributes (+ size and file dates) as well!
See the code for more details.
CORE-10757 #resolve

svn path=/trunk/; revision=71880
reactos/dll/win32/shell32/dialogs/filedefext.cpp