summaryrefslogtreecommitdiff
path: root/trashsys.c
diff options
context:
space:
mode:
authorOskar <[email protected]>2024-07-23 17:27:56 +0200
committerOskar <[email protected]>2024-07-23 17:27:56 +0200
commitdf1f544de155cca000794367292b6e5af15393a4 (patch)
tree8cf33ad40f03fe6076b193874739525915a31654 /trashsys.c
parent76f47be569e8bfeb8a1e0dfbabcfd3bccd8b035b (diff)
fixed case where it gives the wrong error
Diffstat (limited to 'trashsys.c')
-rw-r--r--trashsys.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/trashsys.c b/trashsys.c
index 2178d42..8cec2c3 100644
--- a/trashsys.c
+++ b/trashsys.c
@@ -1062,7 +1062,6 @@ int main (int argc, char *argv[]) {
a_used, f_used, v_used,
n_used, y_used
);
-
choice_mode = handle_ynf(y_used, n_used, f_used);
struct initial_path_info ipi_m;
int cctd;
@@ -1110,9 +1109,12 @@ int main (int argc, char *argv[]) {
struct trashsys_log_info tli_m;
struct dynamic_paths dp;
int tli_fi_r = tli_fill_info(&tli_m , argv[index], false, &ipi_m);
- if(tli_fi_r == NOFILE || tli_fi_r == FUNCTION_FAILURE) {
+ if(tli_fi_r == NOFILE) {
fprintf(stderr, "%s: error '%s': No such file or directory\n", basename(argv[0]), basename(argv[index]));
continue;
+ } else if(tli_fi_r == FUNCTION_FAILURE) {
+ fprintf(stderr, "%s: cannot process paths\n", basename(argv[0]));
+ continue;
}
if(fill_dynamic_paths(&ipi_m, &tli_m, &dp) == -1) {