summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-09-23 14:01:33 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2015-09-28 12:29:50 +0000
commitc08aba2fb93ce31b3a0b2f93e8717804e861d311 (patch)
treec8e448670e4feb18847372742fd4456fec45e624
parent71f8125f21344b5481502d24930bcb6e25369dea (diff)
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 6edbcc1b231feb02f304ff646c323b5df051d9a4 "cid#1242936 handle rename failure.") Change-Id: I409698c4e2e6cc6ccd8b2be80a393c9657b5125d (cherry picked from commit d2a7abebf210cacf9ea357dd8b4a0772be7308df) Reviewed-on: https://gerrit.libreoffice.org/18899 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r--sal/osl/unx/file_misc.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sal/osl/unx/file_misc.cxx b/sal/osl/unx/file_misc.cxx
index abb7a184df39..522e85b43aaf 100644
--- a/sal/osl/unx/file_misc.cxx
+++ b/sal/osl/unx/file_misc.cxx
@@ -816,7 +816,7 @@ static oslFileError oslDoCopy(const sal_Char* pszSourceFileName, const sal_Char*
"sal.osl",
"rename(" << pszDestFileName << ", " << tmpDestFile
<< ") 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
}
}
}