summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-03-07 13:59:19 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-03-07 16:57:30 +0100
commitc67d285a8b213816395948c2082faaf6bb6eab43 (patch)
tree6221390f6398ae1339b7082c4b04ef4675ee76e9 /sal
parenta9ac68b74646a174eabe50f0f29e61947a787cac (diff)
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@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sal')
-rw-r--r--sal/osl/unx/file_misc.cxx2
-rw-r--r--sal/osl/w32/file_dirvol.cxx2
2 files changed, 2 insertions, 2 deletions
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);