r22502 by jghali - #14973: When saving as compressed file, file is not compressed and extension is set to ".gz.gz.sla"

scribus-commit scribus-commit at lists.scribus.net
Mon Apr 30 12:06:38 UTC 2018


Author: jghali
Date: Mon Apr 30 12:06:38 2018
New Revision: 22502

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22502
Log:
#14973: When saving as compressed file, file is not compressed and extension is set to ".gz.gz.sla"

Modified:
    trunk/Scribus/scribus/scribus.cpp

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22502&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp	(original)
+++ trunk/Scribus/scribus/scribus.cpp	Mon Apr 30 12:06:38 2018
@@ -8091,7 +8091,10 @@
 	CustomFDialog *dia = new CustomFDialog(qApp->activeWindow(), workingDirectory, dialogCaption, fileFilter, optionFlags);
 	if (!defaultFilename.isEmpty())
 	{
-		QFileInfo f(defaultFilename);
+		QString tmpFileName = defaultFilename;
+		if (tmpFileName.endsWith(".gz", Qt::CaseInsensitive))
+			tmpFileName.chop(3);
+		QFileInfo f(tmpFileName);
 		dia->setExtension(f.suffix());
 		dia->setZipExtension(f.suffix() + ".gz");
 		dia->setSelection(defaultFilename);




More information about the scribus-commit mailing list