aboutsummaryrefslogtreecommitdiff
path: root/src/libnpass/libnpass.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/libnpass/libnpass.c')
-rw-r--r--src/libnpass/libnpass.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libnpass/libnpass.c b/src/libnpass/libnpass.c
index 6c66a79..94a0647 100644
--- a/src/libnpass/libnpass.c
+++ b/src/libnpass/libnpass.c
@@ -269,7 +269,7 @@ int pass_init(const char *fpr)
err_ret(1, "key not usable, try gpg --full-generate-key");
r = r_mkdir(pass_dir, S_IRWXU);
- if (r)
+ if (r < 0)
err_ret(1, "%s %s", pass_dir, strerror(errno));
r = snprintf(gpg_id_path, sizeof(gpg_id_path), "%s/%s", pass_dir,
@@ -436,5 +436,5 @@ int pass_rm(const char *path)
if (r)
err_ret(1, "%s %s", abs_path, strerror(errno));
- return r_rmdir(pass_dir, dirname(gpg_path));
+ return r_rmdir_empty(pass_dir, dirname(gpg_path));
}