From 588bc9000839bdba8cd22392f76d7f77b8f53c1d Mon Sep 17 00:00:00 2001 From: Danilo Reyes Date: Tue, 16 Jul 2024 15:46:50 -0600 Subject: [PATCH] mogfify bugfix --- photos-metadata.sh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/photos-metadata.sh b/photos-metadata.sh index 3ead96f..281e9d2 100755 --- a/photos-metadata.sh +++ b/photos-metadata.sh @@ -79,11 +79,8 @@ handle_conversion_error() { file_type=$(file --mime-type -b "$photo") if [[ $file_type == image/* ]]; then - new_photo="${photo%.*}.jpg" - echo "Converting $photo to $new_photo using ImageMagick." + echo "Converting $photo to jpg using ImageMagick." mogrify -format jpg "$photo" - mv "${photo%.*}.jpg" "$new_photo" - rm "$photo" else echo "File is a video or unsupported type: $photo. Skipping conversion." fi