From d8bbc7858622b6d9c278469aab701ca0b609cddf Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 15 May 2024 05:35:49 +0200 Subject: Merging upstream version 126.0. Signed-off-by: Daniel Baumann --- xpcom/io/nsIFile.idl | 2 +- xpcom/io/nsILocalFileMac.idl | 2 +- xpcom/io/nsILocalFileWin.idl | 2 +- xpcom/io/nsIRandomAccessStream.idl | 2 +- xpcom/io/nsLocalFileWin.cpp | 8 ++++++-- 5 files changed, 10 insertions(+), 6 deletions(-) (limited to 'xpcom/io') 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 // \* is passed in. If \* 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; -- cgit v1.2.3