comparison 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
comparison
equal deleted inserted replaced
174:6eb9149b65e1 175:6fa0e12ae1d2
102 bool inprofile = false; 102 bool inprofile = false;
103 bool relative_path = false; 103 bool relative_path = false;
104 104
105 if ((inifile = fopen(inifile_name, "r")) != NULL) 105 if ((inifile = fopen(inifile_name, "r")) != NULL)
106 { 106 {
107 DEBUGFPRINT("DEBUG: Searching for profile paths in: '%s'\n", inifile_name);
108
107 inifile_dirname = port_dirname(inifile_name); 109 inifile_dirname = port_dirname(inifile_name);
108 while (fgets(line, LINEBUFLEN, inifile) != NULL) 110 while (fgets(line, LINEBUFLEN, inifile) != NULL)
109 { 111 {
110 /* Determine if we are in an profile section */ 112 /* Determine if we are in an profile section */
111 if (str_starts_with(line, "[Profile")) 113 if (str_starts_with(line, "[Profile"))
128 snprintf(path, LINEBUFLEN, "%s/%s", inifile_dirname, value); 130 snprintf(path, LINEBUFLEN, "%s/%s", inifile_dirname, value);
129 else 131 else
130 strncpy(path, value, LINEBUFLEN); 132 strncpy(path, value, LINEBUFLEN);
131 if ((fqpath = port_realpath(path)) != NULL) 133 if ((fqpath = port_realpath(path)) != NULL)
132 { 134 {
135 DEBUGFPRINT("DEBUG: Found profile path: '%s'\n", fqpath)
133 strv_append(&dirs, fqpath, strlen(fqpath)); 136 strv_append(&dirs, fqpath, strlen(fqpath));
134 free (fqpath); 137 free (fqpath);
135 } 138 }
136 else 139 else
137 return_code |= WARN_MOZ_PROFILE_DOES_NOT_EXIST; 140 {
141 DEBUGFPRINT("DEBUG: WARN! Non existent profile path: '%s'\n", path)
142 return_code |= WARN_MOZ_PROFILE_DOES_NOT_EXIST;
143 }
138 } 144 }
139 else if (str_equal(key, "IsRelative") && 145 else if (str_equal(key, "IsRelative") &&
140 str_starts_with(value, "1")) 146 str_starts_with(value, "1"))
141 relative_path = true; 147 relative_path = true;
142 } 148 }
143 } 149 }
144 } 150 }
145 else 151 else
146 { 152 {
153 DEBUGFPRINT("DEBUG: WARN! Could not open ini file: '%s'\n", inifile_name)
147 return_code |= WARN_MOZ_FAILED_TO_OPEN_INI; 154 return_code |= WARN_MOZ_FAILED_TO_OPEN_INI;
148 } 155 }
149 return dirs; 156 return dirs;
150 } 157 }
151 158

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