diff options
-rw-r--r-- | comphelper/source/misc/stillreadwriteinteraction.cxx | 4 | ||||
-rw-r--r-- | sal/osl/unx/file_error_transl.cxx | 4 | ||||
-rw-r--r-- | ucb/source/ucp/file/filglob.cxx | 4 |
3 files changed, 11 insertions, 1 deletions
diff --git a/comphelper/source/misc/stillreadwriteinteraction.cxx b/comphelper/source/misc/stillreadwriteinteraction.cxx index bf0ecc3fa3e2..0efec31b160b 100644 --- a/comphelper/source/misc/stillreadwriteinteraction.cxx +++ b/comphelper/source/misc/stillreadwriteinteraction.cxx @@ -96,6 +96,10 @@ ucbhelper::InterceptedInteraction::EInterceptionState StillReadWriteInteraction: (exIO.Code == css::ucb::IOErrorCode_ACCESS_DENIED ) || (exIO.Code == css::ucb::IOErrorCode_LOCKING_VIOLATION ) || (exIO.Code == css::ucb::IOErrorCode_NOT_EXISTING ) + // At least on Linux, a request to open some fuse-mounted file O_RDWR may fail with + // EOPNOTSUPP (mapped to osl_File_E_NOSYS to IOErrorCode_NOT_SUPPORTED) when opening + // it O_RDONLY would succeed: + || (exIO.Code == css::ucb::IOErrorCode_NOT_SUPPORTED ) #ifdef MACOSX // this is a workaround for MAC, on this platform if the file is locked // the returned error code looks to be wrong diff --git a/sal/osl/unx/file_error_transl.cxx b/sal/osl/unx/file_error_transl.cxx index f8910289456b..60824f71ed34 100644 --- a/sal/osl/unx/file_error_transl.cxx +++ b/sal/osl/unx/file_error_transl.cxx @@ -134,6 +134,10 @@ oslFileError oslTranslateFileError(int Errno) return osl_File_E_NOLCK; case ENOSYS: + case ENOTSUP: +#if EOPNOTSUPP != ENOTSUP + case EOPNOTSUPP: +#endif return osl_File_E_NOSYS; #if !defined(AIX) || !(defined(_ALL_SOURCE) && !defined(_LINUX_SOURCE_COMPAT)) diff --git a/ucb/source/ucp/file/filglob.cxx b/ucb/source/ucp/file/filglob.cxx index c7d3e60fe515..e19be3458919 100644 --- a/ucb/source/ucp/file/filglob.cxx +++ b/ucb/source/ucp/file/filglob.cxx @@ -344,7 +344,9 @@ namespace fileaccess { case FileBase::E_NOLCK: // No record locks available ioErrorCode = IOErrorCode_LOCKING_VIOLATION; break; - + case FileBase::E_NOSYS: + ioErrorCode = IOErrorCode_NOT_SUPPORTED; + break; case FileBase::E_FAULT: // Bad address case FileBase::E_LOOP: // Too many symbolic links encountered case FileBase::E_NOSPC: // No space left on device |