[Libreoffice-commits] core.git: Branch 'libreoffice-5-0' - sal/osl

Stephan Bergmann sbergman at redhat.com
Mon Sep 28 02:40:09 PDT 2015


 sal/osl/unx/file_misc.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 23be91deb8858bb29793ae8cc9749cf1e5c3c9b2
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Sep 23 14:01:33 2015 +0200

    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/18898
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/sal/osl/unx/file_misc.cxx b/sal/osl/unx/file_misc.cxx
index a5bfc99..1e157d9 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
             }
         }
     }


More information about the Libreoffice-commits mailing list