summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOskar <[email protected]>2024-07-25 16:48:31 +0200
committerOskar <[email protected]>2024-07-25 16:48:31 +0200
commitf5dc30c6a47cc8c9fc1b89a1a41fc23ba0bd29f0 (patch)
tree39a41d5bdfc98b4e96734d5ffa1c167df0456fab
parenta6720a9edfdbcf8e0e006fae7f77934d67bb3254 (diff)
fixed -R option for real this time, i kinda fucked up the last commit somehow
-rw-r--r--trashsys.c7
1 files changed, 6 insertions, 1 deletions
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;
}