From efdd4ab5f33b444d3549543cbaf5372241c9cf73 Mon Sep 17 00:00:00 2001 From: Mikko Rasa Date: Sun, 31 Jul 2011 18:36:54 +0300 Subject: [PATCH 1/1] Add a flag to make statting directories work on win32 --- source/fs/stat.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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"); -- 2.43.0