From f5dc30c6a47cc8c9fc1b89a1a41fc23ba0bd29f0 Mon Sep 17 00:00:00 2001 From: Oskar Date: Thu, 25 Jul 2024 16:48:31 +0200 Subject: fixed -R option for real this time, i kinda fucked up the last commit somehow --- trashsys.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/trashsys.c b/trashsys.c index d7cbfa9..85579c9 100644 --- a/trashsys.c +++ b/trashsys.c @@ -539,7 +539,7 @@ int write_log_file (struct dynamic_paths *dp, struct trashsys_log_info *tli, con char *tmp_path = "/tmp/"; if (t_used_aka_tmp == true) { - fprintf(stdout, "%s", tmp_path); + cvm_fprintf(v_cvm_fprintf, stdout, "%s", tmp_path); } cvm_fprintf(v_cvm_fprintf, stdout, "logfile path: %s\n", dp->new_logfile_path_incl_name); @@ -1160,6 +1160,11 @@ int main (int argc, char *argv[]) { } if(R_used == true) { + if(optind != argc) { + USAGE_OUT(stderr); + return EXIT_FAILURE; + } + if(restore_file(optarg_converted, &ipi_m) == FUNCTION_FAILURE) { return EXIT_FAILURE; } -- cgit v1.2.3