diff options
author | Oskar <[email protected]> | 2024-07-23 17:27:56 +0200 |
---|---|---|
committer | Oskar <[email protected]> | 2024-07-23 17:27:56 +0200 |
commit | df1f544de155cca000794367292b6e5af15393a4 (patch) | |
tree | 8cf33ad40f03fe6076b193874739525915a31654 /trashsys.c | |
parent | 76f47be569e8bfeb8a1e0dfbabcfd3bccd8b035b (diff) |
fixed case where it gives the wrong error
Diffstat (limited to 'trashsys.c')
-rw-r--r-- | trashsys.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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) { |