Kaydet (Commit) a2fb2cfd authored tarafından Michael Stahl's avatar Michael Stahl

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
üst a95c0231
......@@ -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)
......
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