Kaydet (Commit) ac7c79a8 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

cid#982171 Warn about rename failure in error clean-up code

Change-Id: I02e81d526c07297a5bc3664cc475302a552187eb
üst 30c9034c
......@@ -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 )
......
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