r14387 by jghali - #8622 : collect elements for output needs existing directory

scribus-commit scribus-commit at lists.scribus.net
Tue Dec 8 23:45:33 CET 2009


Revision: 14387
Author: jghali
Date: 2009-12-08T12:08:27.128432Z
Commit message: #8622 : collect elements for output needs existing directory

Changeset: 
M  /trunk/Scribus/scribus/collect4output.cpp

Diffs:
Index: scribus/collect4output.cpp
===================================================================
--- scribus/collect4output.cpp	(revision 14386)
+++ scribus/collect4output.cpp	(revision 14387)
@@ -58,6 +58,18 @@
 		return false;
 	if (!outputDirectory.endsWith("/"))
 		outputDirectory += "/";
+	QDir dir(outputDirectory);
+	if (!dir.exists())
+	{
+		bool created = dir.mkpath(outputDirectory);
+		if (!created)
+		{
+			QMessageBox::warning(ScCore->primaryMainWindow(), CommonStrings::trWarning,
+							 "<qt>" + tr("Cannot create directory:\n%1").arg(outputDirectory) + "</qt>",
+							 CommonStrings::tr_OK);
+			return false;
+		}
+	}
 	return true;
 }
 




More information about the scribus-commit mailing list