r20396 - gnucash/trunk/src/report/report-gnome - Fix r20394: Output string clean-up was missing the date part.

Christian Stimming cstim at code.gnucash.org
Fri Mar 11 09:25:55 EST 2011


Author: cstim
Date: 2011-03-11 09:25:55 -0500 (Fri, 11 Mar 2011)
New Revision: 20396
Trac: http://svn.gnucash.org/trac/changeset/20396

Modified:
   gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c
Log:
Fix r20394: Output string clean-up was missing the date part.

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-11 12:53:52 UTC (rev 20395)
+++ gnucash/trunk/src/report/report-gnome/gnc-plugin-page-report.c	2011-03-11 14:25:55 UTC (rev 20396)
@@ -1621,24 +1621,26 @@
         }
     }
 
+    job_name = g_strjoin ( "_", report_name, job_date, NULL );
+    g_free (report_name);
+	report_name = NULL;
+    g_free (job_date);
+
     {
         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))
+        while (strchr(job_name, forbidden_char))
         {
-            *strchr(report_name, forbidden_char) = '_';
+            *strchr(job_name, forbidden_char) = '_';
         }
     }
 
-    job_name = g_strjoin ( "_", report_name, job_date, NULL );
     //g_warning("Setting job name=%s", job_name);
 
     gnc_html_print(priv->html, job_name);
 
-    g_free (report_name);
     g_free (job_name);
-    g_free (job_date);
 }
 
 static void



More information about the gnucash-changes mailing list