sal: UNX: in oslDoCopy, rename into destination directory ...
... not into the source one as that will likely fail with EXDEV if source and target are on different mounts => osl_File_E_EXIST. This broke the xmlsecurity test SigningTest::testOOXMLAppend(). Change-Id: I07ada1d5564fd72a059d588e127a5906a499aca4
This commit is contained in:
@@ -803,7 +803,8 @@ static oslFileError oslDoCopy(const sal_Char* pszSourceFileName, const sal_Char*
|
||||
if ( DestFileExists )
|
||||
{
|
||||
//TODO: better pick a temp file name instead of adding .osl-tmp:
|
||||
tmpDestFile = rtl::OString(pszSourceFileName) + ".osl-tmp";
|
||||
// use the destination file to avoid EXDEV /* Cross-device link */
|
||||
tmpDestFile = rtl::OString(pszDestFileName) + ".osl-tmp";
|
||||
if (rename(pszDestFileName, tmpDestFile.getStr()) != 0)
|
||||
{
|
||||
if (errno == ENOENT)
|
||||
|
Reference in New Issue
Block a user