r18588 by fschmid - Make FileUnzip handle more than 2048 files inside a zip archive.

scribus-commit scribus-commit at lists.scribus.net
Sat Nov 9 08:24:54 UTC 2013


Author: fschmid
Date: Sat Nov  9 08:24:54 2013
New Revision: 18588

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18588
Log:
Make FileUnzip handle more than 2048 files inside a zip archive.

Modified:
    trunk/Scribus/scribus/fileunzip.cpp
    trunk/Scribus/scribus/fileunzip.h

Modified: trunk/Scribus/scribus/fileunzip.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18588&path=/trunk/Scribus/scribus/fileunzip.cpp
==============================================================================
--- trunk/Scribus/scribus/fileunzip.cpp (original)
+++ trunk/Scribus/scribus/fileunzip.cpp Sat Nov  9 08:24:54 2013
@@ -93,10 +93,12 @@
 		QTemporaryFile *tempImageFile = new QTemporaryFile(QDir::tempPath() + "/scribus_temp_zip_XXXXXX.dat");
 		if (tempImageFile == NULL)
 				return NULL;
+		tempImageFile->setAutoRemove(false);
 		tempImageFile->open();
 		QString fname = getLongPathName(tempImageFile->fileName());
 		tempImageFile->close();
-		tempFileList.append(tempImageFile);
+		delete tempImageFile;
+		tempFileList.append(fname);
 		QDir::setCurrent(QDir::tempPath());
 		unzFile uf = unzOpenFile(zipFile);
 		int ret = do_extract_onefile(uf, name, fname, NULL);
@@ -135,7 +137,7 @@
 {
 	for (int a = 0; a < tempFileList.count(); a++)
 	{
-		delete tempFileList[a];
+		QFile::remove(tempFileList[a]);
 	}
 }
 

Modified: trunk/Scribus/scribus/fileunzip.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18588&path=/trunk/Scribus/scribus/fileunzip.h
==============================================================================
--- trunk/Scribus/scribus/fileunzip.h (original)
+++ trunk/Scribus/scribus/fileunzip.h Sat Nov  9 08:24:54 2013
@@ -44,7 +44,7 @@
 {
 private:
 	QString zipFile;
-	QList<QTemporaryFile*> tempFileList;
+	QList<QString> tempFileList;
 public:
 	FileUnzip(QString zipFilePath);
 	~FileUnzip();




More information about the scribus-commit mailing list