diff options
| author | craig <craig@11d20701-8431-0410-a711-e3c959e3b870> | 2012-05-31 20:01:33 +0000 |
|---|---|---|
| committer | craig <craig@11d20701-8431-0410-a711-e3c959e3b870> | 2012-05-31 20:01:33 +0000 |
| commit | 3e45d96fc4cc935f1a318da181f9adafcbd4e7e4 (patch) | |
| tree | df8c7f57f7ed3f00e2c81115bcc108e51b74559a | |
| parent | 7eb293d1e7e887b55c23a1cb992f9aeb03886f24 (diff) | |
| download | scribus-3e45d96fc4cc935f1a318da181f9adafcbd4e7e4.tar.gz scribus-3e45d96fc4cc935f1a318da181f9adafcbd4e7e4.tar.xz scribus-3e45d96fc4cc935f1a318da181f9adafcbd4e7e4.zip | |
Allow FileUnzip to extract to a specific path
git-svn-id: svn://scribus.net/branches/Version14x/Scribus@17528 11d20701-8431-0410-a711-e3c959e3b870
| -rw-r--r-- | scribus/fileunzip.cpp | 8 | ||||
| -rw-r--r-- | scribus/fileunzip.h | 2 |
2 files changed, 7 insertions, 3 deletions
diff --git a/scribus/fileunzip.cpp b/scribus/fileunzip.cpp index 4275a42..a3e034f 100644 --- a/scribus/fileunzip.cpp +++ b/scribus/fileunzip.cpp @@ -83,10 +83,14 @@ FileUnzip::FileUnzip(QString zipFilePath) zipFile = zipFilePath; } -QString FileUnzip::getFile(QString name) +QString FileUnzip::getFile(QString name, QString path) { QString pwd = QDir::currentPath(); - QString outDir = ScPaths::getTempFileDir(); + QString outDir; + if (path.isNull()) + outDir = ScPaths::getTempFileDir(); + else + outDir=path; QFile f(outDir); QFileInfo fi(f); if (!fi.isWritable()) diff --git a/scribus/fileunzip.h b/scribus/fileunzip.h index 47ebcdf..bc1929a 100644 --- a/scribus/fileunzip.h +++ b/scribus/fileunzip.h @@ -45,7 +45,7 @@ private: public: FileUnzip(QString zipFilePath); ~FileUnzip(); - QString getFile(QString name); + QString getFile(QString name, QString path=QString::null); }; #endif |
