summaryrefslogtreecommitdiffstats
path: root/cmd-source-file.c
diff options
context:
space:
mode:
authornicm <nicm>2017-01-09 19:29:12 +0000
committernicm <nicm>2017-01-09 19:29:12 +0000
commit561b5c6fdbdafae52ac5b4bd963f0d75af344c5b (patch)
tree51846b30f0b0fabc2fc8cd3ed7fa8d7a09909f50 /cmd-source-file.c
parent5330a2a85d69647f4f402c5b1fe85dc548ce5416 (diff)
source-file -q needs to apply to glob(3) too.
Diffstat (limited to 'cmd-source-file.c')
-rw-r--r--cmd-source-file.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd-source-file.c b/cmd-source-file.c
index fc5de58b..4ca47193 100644
--- a/cmd-source-file.c
+++ b/cmd-source-file.c
@@ -55,11 +55,13 @@ cmd_source_file_exec(struct cmd *self, struct cmdq_item *item)
glob_t g;
int i;
+ quiet = args_has(args, 'q');
if (glob(args->argv[0], 0, NULL, &g) != 0) {
+ if (quiet && errno == ENOENT)
+ return (CMD_RETURN_NORMAL);
cmdq_error(item, "%s: %s", args->argv[0], strerror(errno));
return (CMD_RETURN_ERROR);
}
- quiet = args_has(args, 'q');
retval = CMD_RETURN_NORMAL;
for (i = 0; i < g.gl_pathc; i++) {