diff options
Diffstat (limited to 'sal')
-rw-r--r-- | sal/osl/unx/file_misc.cxx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sal/osl/unx/file_misc.cxx b/sal/osl/unx/file_misc.cxx index 7f3356ec4f40..3c0ea7751464 100644 --- a/sal/osl/unx/file_misc.cxx +++ b/sal/osl/unx/file_misc.cxx @@ -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) |