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,
d15ff312ad
"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>
This commit is contained in:
@@ -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] = '/';
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user