diff cinst/mozilla.c @ 175:6fa0e12ae1d2

Added more debug output.
author Sascha Wilde <wilde@intevation.de>
date Tue, 25 Mar 2014 16:31:52 +0100
parents 6eb9149b65e1
children c92297bcda8f
line wrap: on
line diff
--- a/cinst/mozilla.c	Tue Mar 25 16:24:32 2014 +0100
+++ b/cinst/mozilla.c	Tue Mar 25 16:31:52 2014 +0100
@@ -104,6 +104,8 @@
 
   if ((inifile = fopen(inifile_name, "r")) != NULL)
     {
+      DEBUGFPRINT("DEBUG: Searching for profile paths in: '%s'\n", inifile_name);
+
       inifile_dirname = port_dirname(inifile_name);
       while (fgets(line, LINEBUFLEN, inifile) != NULL)
         {
@@ -130,11 +132,15 @@
                     strncpy(path, value, LINEBUFLEN);
                   if ((fqpath = port_realpath(path)) != NULL)
                     {
+                      DEBUGFPRINT("DEBUG: Found profile path: '%s'\n", fqpath)
                       strv_append(&dirs, fqpath, strlen(fqpath));
                       free (fqpath);
                     }
                   else
-                    return_code |= WARN_MOZ_PROFILE_DOES_NOT_EXIST;
+                    {
+                      DEBUGFPRINT("DEBUG: WARN!  Non existent profile path: '%s'\n", path)
+                      return_code |= WARN_MOZ_PROFILE_DOES_NOT_EXIST;
+                    }
                 }
               else if (str_equal(key, "IsRelative") &&
                        str_starts_with(value, "1"))
@@ -144,6 +150,7 @@
     }
   else
     {
+      DEBUGFPRINT("DEBUG: WARN!  Could not open ini file: '%s'\n", inifile_name)
       return_code |= WARN_MOZ_FAILED_TO_OPEN_INI;
     }
   return dirs;

http://wald.intevation.org/projects/trustbridge/