diff options
Diffstat (limited to 'sbin')
-rw-r--r-- | sbin/restore/interactive.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/sbin/restore/interactive.c b/sbin/restore/interactive.c index d3ab5cd..e3391d0 100644 --- a/sbin/restore/interactive.c +++ b/sbin/restore/interactive.c @@ -365,8 +365,14 @@ getnext: snprintf(output, sizeof(output), "%s/%s", curdir, rawname); canon(output, name, size); } - if (glob(name, GLOB_ALTDIRFUNC, NULL, &ap->glob) < 0) + switch (glob(name, GLOB_ALTDIRFUNC, NULL, &ap->glob)) { + case GLOB_NOSPACE: fprintf(stderr, "%s: out of memory\n", ap->cmd); + break; + case GLOB_NOMATCH: + fprintf(stderr, "%s %s: no such file or directory\n", ap->cmd, name); + break; + } if (ap->glob.gl_pathc == 0) return; ap->freeglob = 1; |