]> git.tdb.fi Git - libs/core.git/blobdiff - source/io/windows/file.cpp
Check for ERROR_PATH_NOT_FOUND in adition to ERROR_FILE_NOT_FOUND
[libs/core.git] / source / io / windows / file.cpp
index 51fe814a5e29b197f8843d3f4ae1d31653718297..3cbdc4a8ddaf5c6b4c91672479ebf4b1a1383c21 100644 (file)
@@ -42,7 +42,7 @@ void File::platform_init(const string &fn, CreateMode cm)
        if(!handle)
        {
                int err = GetLastError();
-               if(err==ERROR_FILE_NOT_FOUND)
+               if(err==ERROR_FILE_NOT_FOUND || err==ERROR_PATH_NOT_FOUND)
                        throw file_not_found(fn);
                else if(err==ERROR_FILE_EXISTS)
                        throw file_already_exists(fn);