From df1f544de155cca000794367292b6e5af15393a4 Mon Sep 17 00:00:00 2001 From: Oskar Date: Tue, 23 Jul 2024 17:27:56 +0200 Subject: fixed case where it gives the wrong error --- trashsys.c | 6 ++++-- 1 file 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) { -- cgit v1.2.3