r20394 - gnucash/trunk/src/report/report-gnome - When setting a printer job name, remove slashes because they are not allowes in filenames.
Christian Stimming
cstim at code.gnucash.org
Fri Mar 11 02:21:03 EST 2011
Author: cstim
Date: 2011-03-11 02:21:02 -0500 (Fri, 11 Mar 2011)
New Revision: 20394
Trac: http://svn.gnucash.org/trac/changeset/20394
Modified:
gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c
Log:
When setting a printer job name, remove slashes because they are not allowes in filenames.
Modified: gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c
===================================================================
--- gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c 2011-03-10 22:23:55 UTC (rev 20393)
+++ gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c 2011-03-11 07:21:02 UTC (rev 20394)
@@ -1620,6 +1620,17 @@
}
}
}
+
+ {
+ char forbidden_char = '/';
+ // Now remove the characters that are not allowed in file
+ // names. FIXME: Check for all disallowed characters here!
+ while (strchr(report_name, forbidden_char))
+ {
+ *strchr(report_name, forbidden_char) = '_';
+ }
+ }
+
job_name = g_strjoin ( "_", report_name, job_date, NULL );
//g_warning("Setting job name=%s", job_name);
More information about the gnucash-changes
mailing list