diff options
Diffstat (limited to 'sfx2/source/doc/docfile.cxx')
-rw-r--r-- | sfx2/source/doc/docfile.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx index 638ecb5fc2f0..f8f5c85f757b 100644 --- a/sfx2/source/doc/docfile.cxx +++ b/sfx2/source/doc/docfile.cxx @@ -180,8 +180,10 @@ sal_uInt64 GetDefaultFileAttributes(const OUString& rURL) if (!comphelper::isFileUrl(rURL)) return nRet; + // Make sure the file exists (and create it if not). osl::File aFile(rURL); - if (aFile.open(osl_File_OpenFlag_Create) != osl::File::E_None) + osl::File::RC nRes = aFile.open(osl_File_OpenFlag_Create); + if (nRes != osl::File::E_None && nRes != osl::File::E_EXIST) return nRet; aFile.close(); |