Kaydet (Commit) 23be91de authored tarafından Stephan Bergmann's avatar Stephan Bergmann Kaydeden (comit) Miklos Vajna

Better fail with E_EXIST if rename(3) fails

...it leads to better handling of the failure downstream, if e.g. this is an
attempt to copy a file from the presets to an existing file of a previously
partly generated UserInstallation, and the presets and the UserInstallation are
on different drives and rename(3) fails with EXDEV.  (Without this fix, removing
the UserInstallation's registrymodifications.xcu caused restarting soffice to
fail with "User installation could not be completed" in this case; regression
introduced with 6edbcc1b "cid#1242936 handle
rename failure.")

Change-Id: I409698c4e2e6cc6ccd8b2be80a393c9657b5125d
(cherry picked from commit d2a7abeb)
Reviewed-on: https://gerrit.libreoffice.org/18898Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst ea91af84
...@@ -816,7 +816,7 @@ static oslFileError oslDoCopy(const sal_Char* pszSourceFileName, const sal_Char* ...@@ -816,7 +816,7 @@ static oslFileError oslDoCopy(const sal_Char* pszSourceFileName, const sal_Char*
"sal.osl", "sal.osl",
"rename(" << pszDestFileName << ", " << tmpDestFile "rename(" << pszDestFileName << ", " << tmpDestFile
<< ") failed with errno " << e); << ") failed with errno " << e);
return osl_File_E_BUSY; // for want of a better error code return osl_File_E_EXIST; // for want of a better error code
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment