X-Git-Url: http://git.tdb.fi/?p=libs%2Fcore.git;a=blobdiff_plain;f=source%2Ffs%2Fwindows%2Fstat.cpp;h=a1f19efa7de25f5bd462aa8f08dcde57726161c4;hp=f0cbdb653a743a0538f1948de4479e1a3490ea8f;hb=d91c3450a11c097d34ceba4444758fffe815b61a;hpb=609c9a508cfdc7b42c46c4f21d17639204165a00 diff --git a/source/fs/windows/stat.cpp b/source/fs/windows/stat.cpp index f0cbdb6..a1f19ef 100644 --- a/source/fs/windows/stat.cpp +++ b/source/fs/windows/stat.cpp @@ -80,7 +80,7 @@ Stat Stat::stat(const Path &path) if(err==ERROR_FILE_NOT_FOUND) return Stat(); else - throw system_error("CreateFile", err); + throw system_error(format("CreateFile(%s)", path), err); } BY_HANDLE_FILE_INFORMATION info; @@ -91,6 +91,7 @@ Stat Stat::stat(const Path &path) } Stat result; + result.exists = true; if(info.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY) result.type = DIRECTORY; else