diff options
Diffstat (limited to 'xpcom/io/nsLocalFileWin.cpp')
-rw-r--r-- | xpcom/io/nsLocalFileWin.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/xpcom/io/nsLocalFileWin.cpp b/xpcom/io/nsLocalFileWin.cpp index 13fea1d2ca..3d62a69a10 100644 --- a/xpcom/io/nsLocalFileWin.cpp +++ b/xpcom/io/nsLocalFileWin.cpp @@ -326,6 +326,8 @@ static nsresult ConvertWinError(DWORD aWinErr) { [[fallthrough]]; // to NS_ERROR_FILE_DEVICE_FAILURE case ERROR_DEV_NOT_EXIST: [[fallthrough]]; // to NS_ERROR_FILE_DEVICE_FAILURE + case ERROR_INVALID_FUNCTION: + [[fallthrough]]; // to NS_ERROR_FILE_DEVICE_FAILURE case ERROR_IO_DEVICE: rv = NS_ERROR_FILE_DEVICE_FAILURE; break; @@ -671,10 +673,12 @@ static nsresult OpenDir(const nsString& aName, nsDir** aDir) { filename.ReplaceChar(L'/', L'\\'); - // FindFirstFileW Will have a last error of ERROR_DIRECTORY if + // FindFirstFileExW Will have a last error of ERROR_DIRECTORY if // <file_path>\* is passed in. If <unknown_path>\* is passed in then // ERROR_PATH_NOT_FOUND will be the last error. - d->handle = ::FindFirstFileW(filename.get(), &(d->data)); + d->handle = ::FindFirstFileExW(filename.get(), FindExInfoBasic, &(d->data), + FindExSearchNameMatch, nullptr, + FIND_FIRST_EX_LARGE_FETCH); if (d->handle == INVALID_HANDLE_VALUE) { delete d; |