]> git.tdb.fi Git - libs/core.git/commitdiff
Add a flag to make statting directories work on win32
authorMikko Rasa <tdb@tdb.fi>
Sun, 31 Jul 2011 15:36:54 +0000 (18:36 +0300)
committerMikko Rasa <tdb@tdb.fi>
Sun, 31 Jul 2011 15:36:54 +0000 (18:36 +0300)
source/fs/stat.cpp

index b0267d8771d08586645261b7a775c3a991f16aeb..2419c2990c9bd9353f06e1ddcaf481afae6bb03e 100644 (file)
@@ -88,7 +88,7 @@ Stat Stat::stat(const Path &path)
 {
 #ifdef WIN32
        HANDLE handle;
-       handle = CreateFile(path.str().c_str(), 0, FILE_SHARE_READ, 0, OPEN_EXISTING, 0, 0);
+       handle = CreateFile(path.str().c_str(), 0, FILE_SHARE_READ, 0, OPEN_EXISTING, FILE_FLAG_BACKUP_SEMANTICS, 0);
        if(handle==INVALID_HANDLE_VALUE)
                throw system_error("CreateFile");