When setting a printer job name, remove slashes because they are not allowes in filenames.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@20394 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming
2011-03-11 07:21:02 +00:00
parent 059403e423
commit 1c0422c0d7
@@ -1620,6 +1620,17 @@ gnc_plugin_page_report_print_cb( GtkAction *action, GncPluginPageReport *report
}
}
}
{
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);