r24060 by jghali - Place filename in double quotes when sending file to printer

scribus-commit scribus-commit at lists.scribus.net
Thu Oct 8 22:42:10 UTC 2020


Author: jghali
Date: Thu Oct  8 22:42:10 2020
New Revision: 24060

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24060
Log:
Place filename in double quotes when sending file to printer

Modified:
    trunk/Scribus/scribus/scprintengine_pdf.cpp
    trunk/Scribus/scribus/scprintengine_ps.cpp

Modified: trunk/Scribus/scribus/scprintengine_pdf.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24060&path=/trunk/Scribus/scribus/scprintengine_pdf.cpp
==============================================================================
--- trunk/Scribus/scribus/scprintengine_pdf.cpp	(original)
+++ trunk/Scribus/scribus/scprintengine_pdf.cpp	Thu Oct  8 22:42:10 2020
@@ -54,7 +54,7 @@
 	{
 		cmd += options.printerCommand;
 		cmd += " ";
-		cmd += fileName;
+		cmd += "\"" + fileName + "\"";
 		system(cmd.data());
 	}
 	else
@@ -66,7 +66,8 @@
 		if (options.copies > 1)
 			cmd += " -#" + cc.setNum(options.copies);
 		cmd += options.printerOptions;
-		cmd += " " + fileName;
+		cmd += " ";
+		cmd += "\"" + fileName + "\"";
 		system(cmd.data());
 	}
 	// Disabled that for now, as kprinter won't work otherwise

Modified: trunk/Scribus/scribus/scprintengine_ps.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24060&path=/trunk/Scribus/scribus/scprintengine_ps.cpp
==============================================================================
--- trunk/Scribus/scribus/scprintengine_ps.cpp	(original)
+++ trunk/Scribus/scribus/scprintengine_ps.cpp	Thu Oct  8 22:42:10 2020
@@ -61,7 +61,7 @@
 	{
 		cmd += options.printerCommand;
 		cmd += " ";
-		cmd += filename;
+		cmd += "\"" + filename + "\"";
 		system(cmd.data());
 	}
 	else
@@ -73,7 +73,8 @@
 		if (options.copies > 1)
 			cmd += " -#" + cc.setNum(options.copies);
 		cmd += options.printerOptions;
-		cmd += " " + filename;
+		cmd += " ";
+		cmd += "\"" + filename + "\"";
 		system(cmd.data());
 	}
 	// Disabled that for now, as kprinter won't work otherwise




More information about the scribus-commit mailing list