aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2016-11-26 19:00:02 -0500
committerMike Frysinger <vapier@gentoo.org>2016-11-26 19:00:02 -0500
commite98d5c97eef7533ec49ad46bbecba60ac38f430f (patch)
treec9fb0896f34aa0d1837a3fdc3ad656f7dbaad7ac /qxpak.c
parentrewrite docs in markdown for github integration (diff)
downloadportage-utils-e98d5c97eef7533ec49ad46bbecba60ac38f430f.tar.gz
portage-utils-e98d5c97eef7533ec49ad46bbecba60ac38f430f.tar.bz2
portage-utils-e98d5c97eef7533ec49ad46bbecba60ac38f430f.zip
qxpak: check -d argument
Diffstat (limited to 'qxpak.c')
-rw-r--r--qxpak.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/qxpak.c b/qxpak.c
index baceda99..aa1a2817 100644
--- a/qxpak.c
+++ b/qxpak.c
@@ -393,6 +393,8 @@ int qxpak_main(int argc, char **argv)
if (dir_fd != AT_FDCWD)
err("Only use -d once");
dir_fd = open(optarg, O_RDONLY|O_CLOEXEC|O_PATH);
+ if (dir_fd < 0)
+ errp("Could not open directory %s", optarg);
break;
}
}