[Libreoffice-commits] core.git: sal/osl
Stephan Bergmann
sbergman at redhat.com
Fri Oct 31 05:46:27 PDT 2014
sal/osl/unx/file_misc.cxx | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
New commits:
commit ac7c79a82fc8768b2564ef7f20bff38db6946c9b
Author: Stephan Bergmann <sbergman at 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 )
More information about the Libreoffice-commits
mailing list