r23304 - gnucash/trunk/src/bin - Eliminate null entries in path lists in environment_override.

Mike Alexander mta at code.gnucash.org
Sat Oct 19 23:37:44 EDT 2013


Author: mta
Date: 2013-10-19 23:37:43 -0400 (Sat, 19 Oct 2013)
New Revision: 23304
Trac: http://svn.gnucash.org/trac/changeset/23304

Modified:
   gnucash/trunk/src/bin/gnucash-bin.c
Log:
Eliminate null entries in path lists in environment_override.

Modified: gnucash/trunk/src/bin/gnucash-bin.c
===================================================================
--- gnucash/trunk/src/bin/gnucash-bin.c	2013-10-20 03:34:20 UTC (rev 23303)
+++ gnucash/trunk/src/bin/gnucash-bin.c	2013-10-20 03:37:43 UTC (rev 23304)
@@ -309,10 +309,13 @@
             for ( j = 0; j < val_count; j++ )
             {
                 gchar *expanded = environment_expand (val_list[j]);
-                new_val = g_build_path (G_SEARCHPATH_SEPARATOR_S, tmp_val, expanded, NULL);
-                g_free (tmp_val);
-                g_free(expanded);
-                tmp_val = new_val;
+                if (expanded && strlen(expanded))
+                {
+                    new_val = g_build_path (G_SEARCHPATH_SEPARATOR_S, tmp_val, expanded, NULL);
+                    g_free (tmp_val);
+                    g_free(expanded);
+                    tmp_val = new_val;
+                }
             }
             g_strfreev (val_list);
 



More information about the gnucash-changes mailing list