diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-08-05 23:26:27 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-08-07 07:53:18 +0000 |
commit | ef698035aa2aa64fc4c4455b394e6782772fef4f (patch) | |
tree | e75853035e60af5cc5634ef776249dee37f24b7c /package/source/zipapi/ZipOutputEntry.cxx | |
parent | 745c7bce5fe8b218f7d300667a5409bc7ef58c34 (diff) |
Related: tdf#88314 delete temp files
clear to close the inputstream before attempting to delete the temp file, which
is plausible as the windows-specific failure in earlier attempts at this
Change-Id: I751aa3a098dd960f56b77a5f5fc93783c1060556
Reviewed-on: https://gerrit.libreoffice.org/17531
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'package/source/zipapi/ZipOutputEntry.cxx')
-rw-r--r-- | package/source/zipapi/ZipOutputEntry.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/package/source/zipapi/ZipOutputEntry.cxx b/package/source/zipapi/ZipOutputEntry.cxx index e3070036fa31..47ecbb4622af 100644 --- a/package/source/zipapi/ZipOutputEntry.cxx +++ b/package/source/zipapi/ZipOutputEntry.cxx @@ -114,6 +114,13 @@ void ZipOutputEntry::closeBufferFile() m_xOutStream.clear(); } +void ZipOutputEntry::deleteBufferFile() +{ + assert(!m_xOutStream.is() && !m_aTempURL.isEmpty()); + uno::Reference < ucb::XSimpleFileAccess3 > xAccess(ucb::SimpleFileAccess::create(m_xContext)); + xAccess->kill(m_aTempURL); +} + uno::Reference< io::XInputStream > ZipOutputEntry::getData() const { uno::Reference < ucb::XSimpleFileAccess3 > xTempAccess(ucb::SimpleFileAccess::create(m_xContext)); |