summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2018-01-09 17:19:25 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2018-01-09 20:10:01 +0100
commita50e1b6d9ddbd4fd7b0597a5eb69f9bf2aab5d07 (patch)
treed5d323f2aa7c12cb92cb560be5e9ae3ec840e169 /sfx2
parentfee2ccddfc228675662e1afe97e41eb66076cb26 (diff)
sfx2 store: avoid custom parent for tempfiles during load
Hopefully this fixes: shutil.Error: [('/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/sw/qa/extras/rtfexport/data/testTdf74795__Import_7fmlh7.tmp', '/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/tempdir/gbuild53mqa9vx/sw/qa/extras/rtfexport/data/testTdf74795__Import_7fmlh7.tmp', "[Errno 2] No such file or directory: '/home/tdf/lode/jenkins/workspace/lo_tb_master_linux_dbg/sw/qa/extras/rtfexport/data/testTdf74795__Import_7fmlh7.tmp'")] from PythonTest_solenv_python at <https://ci.libreoffice.org/job/lo_tb_master_linux_dbg/18100/console>, given that we now set a custom parent for temp files backing up output streams only, not input ones. Change-Id: I395fcb9ff668796ae2ac0425eef9b5d2d8cc0987 Reviewed-on: https://gerrit.libreoffice.org/47664 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/doc/docfile.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index 2e4ac54ba75c..59dd5307877c 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -3393,9 +3393,9 @@ void SfxMedium::CreateTempFile( bool bReplace )
}
OUString aLogicBase;
- if (comphelper::isFileUrl(pImpl->m_aLogicName))
+ if (comphelper::isFileUrl(pImpl->m_aLogicName) && !pImpl->m_pInStream)
{
- // Try to create the temp file in the same directory.
+ // Try to create the temp file in the same directory when storing.
sal_Int32 nOffset = pImpl->m_aLogicName.lastIndexOf("/");
if (nOffset != -1)
aLogicBase = pImpl->m_aLogicName.copy(0, nOffset);