From: Mikko Rasa Date: Sun, 31 Jul 2011 15:36:54 +0000 (+0300) Subject: Add a flag to make statting directories work on win32 X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=efdd4ab5f33b444d3549543cbaf5372241c9cf73;p=libs%2Fcore.git Add a flag to make statting directories work on win32 --- diff --git a/source/fs/stat.cpp b/source/fs/stat.cpp index b0267d8..2419c29 100644 --- a/source/fs/stat.cpp +++ b/source/fs/stat.cpp @@ -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");