sal/osl/unx/file_misc.cxx |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit ac7c79a82fc8768b2564ef7f20bff38db6946c9b
Author: Stephan Bergmann <sberg...@redhat.com>
Date:   Fri Oct 31 13:45:57 2014 +0100

    cid#982171 Warn about rename failure in error clean-up code
    
    Change-Id: I02e81d526c07297a5bc3664cc475302a552187eb

diff --git a/sal/osl/unx/file_misc.cxx b/sal/osl/unx/file_misc.cxx
index 597349d..7873783 100644
--- a/sal/osl/unx/file_misc.cxx
+++ b/sal/osl/unx/file_misc.cxx
@@ -843,7 +843,14 @@ static oslFileError oslDoCopy(const sal_Char* 
pszSourceFileName, const sal_Char*
     if ( nRet > 0 && DestFileExists == 1 )
     {
         unlink(pszDestFileName);
-        rename(tmpDestFile.getStr(), pszDestFileName);
+        if (rename(tmpDestFile.getStr(), pszDestFileName) != 0)
+        {
+            int e = errno;
+            SAL_WARN(
+                "sal.osl",
+                "rename(" << tmpDestFile << ", " << pszDestFileName
+                << ") failed with errno " << e);
+        }
     }
 
     if ( nRet > 0 )
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to