osl_File checks: creation in root can also fail because of read-only filesystem

80b7949016 enabled a bunch of previously
disabled checks, but on m1 macs osl_File::open::open_004 fails the
assert, because it doesn't fail with E_ACCES, but with E_ROFS.
(probably nothing to do with apple silicon, but rather because of Big
Sur and using apfs as filesystem)

Change-Id: Ibd2168ba5fb9d859ea339713099c9bc8a799fcc7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110431
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
This commit is contained in:
Christian Lohmaier
2021-02-04 22:56:52 +01:00
parent 896366b461
commit 5e124e9d9d

View File

@@ -2224,7 +2224,7 @@ namespace osl_File
File testFile(aTestFile);
auto nError1 = testFile.open(osl_File_OpenFlag_Create);
bool bOK = (nError1 == File::E_ACCES);
bool bOK = (nError1 == File::E_ACCES || nError1 == File::E_ROFS);
#ifdef _WIN32
bOK = true; /// in Windows, you can create file in c:\ any way.
testFile.close();