diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/dillo.cc | 6 | ||||
-rw-r--r-- | src/paths.cc | 7 |
2 files changed, 9 insertions, 4 deletions
diff --git a/src/dillo.cc b/src/dillo.cc index 078de258..3e663a4d 100644 --- a/src/dillo.cc +++ b/src/dillo.cc @@ -258,15 +258,15 @@ int main(int argc, char **argv) } dFree(opt_argv); + // set the default values for the preferences + a_Prefs_init(); + // create ~/.dillo if not present Paths::init(); // initialize default key bindings Keys::init(); - // set the default values for the preferences - a_Prefs_init(); - // parse dillorc if ((fp = Paths::getPrefsFP(PATHS_RC_PREFS))) { PrefsParser::parse(fp); diff --git a/src/paths.cc b/src/paths.cc index 8c5bd20a..9d0abda0 100644 --- a/src/paths.cc +++ b/src/paths.cc @@ -32,10 +32,15 @@ void Paths::init(void) { char *path; struct stat st; + int rc = 0; dFree(oldWorkingDir); oldWorkingDir = dGetcwd(); - chdir("/tmp"); + rc = chdir("/tmp"); + if (rc == -1) { + MSG("paths: error changing directory to /tmp: %s\n", + dStrerror(errno)); + } path = dStrconcat(dGethomedir(), "/.dillo", NULL); if (stat(path, &st) == -1) { |