diff options
Diffstat (limited to 'src/lpass.c')
-rw-r--r-- | src/lpass.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/lpass.c b/src/lpass.c index c6a42cf..ae5c4b7 100644 --- a/src/lpass.c +++ b/src/lpass.c @@ -63,14 +63,13 @@ static int goto_maindir() { char *rootdir = xstrcat(getenv("HOME"), LOCKPASS_DIR, "/"); int retval = chdir(rootdir); - if(retval) // failed + if(retval) { if(errno == ENOENT) { - // create main directory: retval = mkdir(rootdir, S_IRWXU); if(retval && errno != EEXIST) { print_error("Error: %s\n", strerror(errno)); - } else { // try again: + } else { retval = chdir(rootdir); } } else { |