summaryrefslogtreecommitdiffstats
path: root/xpcom/io
diff options
context:
space:
mode:
Diffstat (limited to 'xpcom/io')
-rw-r--r--xpcom/io/nsIFile.idl2
-rw-r--r--xpcom/io/nsILocalFileMac.idl2
-rw-r--r--xpcom/io/nsILocalFileWin.idl2
-rw-r--r--xpcom/io/nsIRandomAccessStream.idl2
-rw-r--r--xpcom/io/nsLocalFileWin.cpp8
5 files changed, 10 insertions, 6 deletions
diff --git a/xpcom/io/nsIFile.idl b/xpcom/io/nsIFile.idl
index 535a7a88ee..89c2155e94 100644
--- a/xpcom/io/nsIFile.idl
+++ b/xpcom/io/nsIFile.idl
@@ -106,7 +106,7 @@ interface nsIFile : nsISupports
* ancestor directories (and return an error instead).
*/
[must_use] void create(in unsigned long type, in unsigned long permissions,
- [optional,default(false)] in bool skipAncestors);
+ [optional,default(false)] in boolean skipAncestors);
/**
* Accessor to the leaf name of the file itself.
diff --git a/xpcom/io/nsILocalFileMac.idl b/xpcom/io/nsILocalFileMac.idl
index 38559517e7..a9de769b86 100644
--- a/xpcom/io/nsILocalFileMac.idl
+++ b/xpcom/io/nsILocalFileMac.idl
@@ -176,7 +176,7 @@ interface nsILocalFileMac : nsIFile
*
* @return Whether or not the extended attribute is present.
*/
- bool hasXAttr(in ACString aAttrName);
+ boolean hasXAttr(in ACString aAttrName);
/**
* Get the value of the extended attribute.
diff --git a/xpcom/io/nsILocalFileWin.idl b/xpcom/io/nsILocalFileWin.idl
index a3f80d391b..1195e2aa58 100644
--- a/xpcom/io/nsILocalFileWin.idl
+++ b/xpcom/io/nsILocalFileWin.idl
@@ -53,7 +53,7 @@ interface nsILocalFileWin : nsIFile
* Throws NS_ERROR_FILE_INVALID_PATH for an invalid file.
* Throws NS_ERROR_FAILURE if the set or get fails.
*/
- attribute bool readOnly;
+ attribute boolean readOnly;
/**
* Setting this to true will prepend the prefix "\\?\" to all parsed file
diff --git a/xpcom/io/nsIRandomAccessStream.idl b/xpcom/io/nsIRandomAccessStream.idl
index 20421def17..87bc3626f3 100644
--- a/xpcom/io/nsIRandomAccessStream.idl
+++ b/xpcom/io/nsIRandomAccessStream.idl
@@ -58,5 +58,5 @@ interface nsIRandomAccessStream : nsISeekableStream
[notxpcom, nostdcall] RandomAccessStreamParams serialize(in nsIInterfaceRequestor aCallbacks);
- [notxpcom, nostdcall] bool deserialize(inout RandomAccessStreamParamsRef params);
+ [notxpcom, nostdcall] boolean deserialize(inout RandomAccessStreamParamsRef params);
};
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;