diff options
-rw-r--r-- | src/util/program.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/util/program.c b/src/util/program.c index 6045f59cf..4985995b4 100644 --- a/src/util/program.c +++ b/src/util/program.c | |||
@@ -9,7 +9,7 @@ | |||
9 | 9 | ||
10 | GNUnet is distributed in the hope that it will be useful, but | 10 | GNUnet is distributed in the hope that it will be useful, but |
11 | WITHOUT ANY WARRANTY; without even the implied warranty of | 11 | WITHOUT ANY WARRANTY; without even the implied warranty of |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPROSE. See the GNU |
13 | General Public License for more details. | 13 | General Public License for more details. |
14 | 14 | ||
15 | You should have received a copy of the GNU General Public License | 15 | You should have received a copy of the GNU General Public License |
@@ -240,7 +240,17 @@ GNUNET_PROGRAM_run2 (int argc, char *const *argv, const char *binaryName, | |||
240 | GNUNET_free (lpfx); | 240 | GNUNET_free (lpfx); |
241 | return (ret == GNUNET_SYSERR) ? GNUNET_SYSERR : GNUNET_OK; | 241 | return (ret == GNUNET_SYSERR) ? GNUNET_SYSERR : GNUNET_OK; |
242 | } | 242 | } |
243 | (void) GNUNET_CONFIGURATION_load (cfg, cc.cfgfile); | 243 | if (GNUNET_YES == |
244 | GNUNET_DISK_file_test (cc.cfgfile)) | ||
245 | (void) GNUNET_CONFIGURATION_load (cfg, cc.cfgfile); | ||
246 | else | ||
247 | { | ||
248 | (void) GNUNET_CONFIGURATION_load (cfg, NULL); | ||
249 | if (0 != strcmp (cc.cfgfile, GNUNET_DEFAULT_USER_CONFIG_FILE)) | ||
250 | GNUNET_log (GNUNET_ERROR_TYPE_ERROR, | ||
251 | _("Could not access configuration file `%s'\n"), | ||
252 | cc.cfgfile); | ||
253 | } | ||
244 | GNUNET_free (allopts); | 254 | GNUNET_free (allopts); |
245 | GNUNET_free (lpfx); | 255 | GNUNET_free (lpfx); |
246 | if (GNUNET_OK == | 256 | if (GNUNET_OK == |