Kaydet (Commit) a50e1b6d authored tarafından Miklos Vajna's avatar Miklos Vajna

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/47664Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
üst fee2ccdd
...@@ -3393,9 +3393,9 @@ void SfxMedium::CreateTempFile( bool bReplace ) ...@@ -3393,9 +3393,9 @@ void SfxMedium::CreateTempFile( bool bReplace )
} }
OUString aLogicBase; 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("/"); sal_Int32 nOffset = pImpl->m_aLogicName.lastIndexOf("/");
if (nOffset != -1) if (nOffset != -1)
aLogicBase = pImpl->m_aLogicName.copy(0, nOffset); aLogicBase = pImpl->m_aLogicName.copy(0, nOffset);
......
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