Fix 'Unable to work from STDIO while reading password' when password is passed to command line parameters, courtesy of Emil Williams.

This commit is contained in:
Con Kolivas 2023-06-29 15:49:10 +10:00
parent 0c6f6b5723
commit 813f06becf

2
main.c
View file

@ -712,7 +712,7 @@ recursion:
gettimeofday(&start_time, NULL); 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"); failure("Unable to work from STDIO while reading password\n");
memcpy(&local_control, &base_control, sizeof(rzip_control)); memcpy(&local_control, &base_control, sizeof(rzip_control));