Fix recursion if file exists

This commit is contained in:
kageru 2021-10-16 12:20:27 +02:00
parent 8e6ff42794
commit d6d0050233
Signed by: kageru
GPG Key ID: 8282A2BEA4ADA3D2

7
ppsh
View File

@ -72,7 +72,12 @@ capture_and_upload() {
notify-send "$full_url"
else
echo "Debug: file $local_file already exists, retrying…"
prepare_files # recurse here to generate a new name and start anew
# recurse here to generate a new name and start anew
if [ -f "$local_file" ]; then
main "$local_file"
else
main
fi
fi
}