summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-10-15 13:13:23 +0200
committerMichael Stahl <mstahl@redhat.com>2014-10-15 18:03:16 +0200
commitbeb45beba1529b0706a8dbe732c71b19493bcd7e (patch)
treedf48b3cd01ed74cef589cc04d9fa7750788ce76c /sw
parentcb4cb0c053d257d231bdd3e5eaeb3e1c08aac036 (diff)
sw: fix massive temp dir leak in SwModelTestBase
Change-Id: I92455612c41564e74570b4ee4fa4e3cdfa20f24d
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/inc/swmodeltestbase.hxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx b/sw/qa/extras/inc/swmodeltestbase.hxx
index 8048b8c6ecc9..d2e26476835b 100644
--- a/sw/qa/extras/inc/swmodeltestbase.hxx
+++ b/sw/qa/extras/inc/swmodeltestbase.hxx
@@ -38,6 +38,7 @@
#include <rtl/byteseq.hxx>
#include <comphelper/processfactory.hxx>
#include <unotools/tempfile.hxx>
+#include <unotools/localfilehelper.hxx>
#include <unotools/mediadescriptor.hxx>
#include <dbmgr.hxx>
#include <unoprnms.hxx>
@@ -193,7 +194,6 @@ protected:
sal_uInt32 mnStartTime;
utl::TempFile maTempFile;
- utl::TempFile maTempDir;
bool mbExported; ///< Does maTempFile already contain something useful?
sal_Int16 nCurOutputType;
@@ -215,7 +215,6 @@ public:
, mpTestDocumentPath(pTestDocumentPath)
, mpFilter(pFilter)
, mnStartTime(0)
- , maTempDir(NULL, true)
, mbExported(false)
, nCurOutputType(0)
{
@@ -326,7 +325,8 @@ protected:
load(mpTestDocumentPath, filename);
const OUString aPrefix( "LOMM_" );
- const OUString aWorkDir = maTempDir.GetURL();
+ utl::TempFile aTempDir(nullptr, true);
+ const OUString aWorkDir = aTempDir.GetURL();
const OUString aURI( getURLFromSrc(mpTestDocumentPath) + OUString::createFromAscii(datasource) );
OUString aDBName = registerDBsource( aURI, aPrefix, aWorkDir );
initMailMergeJobAndArgs( filename, tablename, aDBName, aPrefix, aWorkDir );
@@ -334,6 +334,8 @@ protected:
postTest(filename);
verify();
finish();
+
+ ::utl::removeTree(aWorkDir);
}
/**