[Libreoffice-commits] core.git: sal/osl
Stephan Bergmann
sbergman at redhat.com
Wed Mar 7 15:57:55 UTC 2018
sal/osl/unx/file_misc.cxx | 2 +-
sal/osl/w32/file_dirvol.cxx | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
New commits:
commit c67d285a8b213816395948c2082faaf6bb6eab43
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Mar 7 13:59:19 2018 +0100
Intermediate dir may come into existence during osl_createDirectoryPath
...when some other entity creates it in parallel. This used to stop creating
any subsequent sub-directories in the chain, and instead return a misleading
osl_File_E_EXIST.
I assume this is the underlying issue of the sporadic Jenkins "Daily Screenshot
Build on Windows" failures. (After the previous attempt at getting at that,
d15ff312ad80e4d1f210636e3374a81c14c229a2 "Normalize computation of directory and
file-in-directory URLs",
<https://ci.libreoffice.org/job/lo_tb_master_win_screenshot/333/console> now
failed for a different file after all,
workdir/screenshots/modules/schart/ui/datarangedialog/DataRangeDialog.png during
CppunitTest_chart2_dialogs_test.)
Change-Id: I00ee67c1ef634c5390c677693e143c26266eeda7
Reviewed-on: https://gerrit.libreoffice.org/50892
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/sal/osl/unx/file_misc.cxx b/sal/osl/unx/file_misc.cxx
index 034ed56df5cb..7e3386cfa4e5 100644
--- a/sal/osl/unx/file_misc.cxx
+++ b/sal/osl/unx/file_misc.cxx
@@ -537,7 +537,7 @@ static oslFileError create_dir_recursively_(
oslFileError osl_error = create_dir_recursively_(
dir_path, aDirectoryCreationCallbackFunc, pData);
- if (osl_error != osl_File_E_None)
+ if (osl_error != osl_File_E_None && osl_error != osl_File_E_EXIST)
return osl_error;
dir_path[pos] = '/';
diff --git a/sal/osl/w32/file_dirvol.cxx b/sal/osl/w32/file_dirvol.cxx
index 929916965777..c9a6c4dd16b6 100644
--- a/sal/osl/w32/file_dirvol.cxx
+++ b/sal/osl/w32/file_dirvol.cxx
@@ -639,7 +639,7 @@ static DWORD create_dir_recursively_(
dir_path->buffer[pos] = BACKSLASH; // restore
- if (ERROR_SUCCESS != w32_error)
+ if (ERROR_SUCCESS != w32_error && ERROR_ALREADY_EXISTS != w32_error)
return w32_error;
return create_dir_recursively_(dir_path, aDirectoryCreationCallbackFunc, pData);
More information about the Libreoffice-commits
mailing list