From 813f06becf40bb085b9a5391922b7f52cb89ea1d Mon Sep 17 00:00:00 2001 From: Con Kolivas Date: Thu, 29 Jun 2023 15:49:10 +1000 Subject: [PATCH] Fix 'Unable to work from STDIO while reading password' when password is passed to command line parameters, courtesy of Emil Williams. --- main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.c b/main.c index eb0985f..2dee67c 100644 --- a/main.c +++ b/main.c @@ -712,7 +712,7 @@ recursion: gettimeofday(&start_time, NULL); - if (unlikely((STDIN || STDOUT) && ENCRYPT)) + if (!control->passphrase && (unlikely((STDIN || STDOUT) && ENCRYPT))) failure("Unable to work from STDIO while reading password\n"); memcpy(&local_control, &base_control, sizeof(rzip_control));