diff options
| author | Paul Buetow <paul@buetow.org> | 2026-06-02 22:12:34 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-06-02 22:12:34 +0300 |
| commit | 7557532c88f086106fb2ff52b07e73dfc68e9ee6 (patch) | |
| tree | 068a3e0ad8d7b197e7edbc893e28d0144294aa22 /src | |
| parent | 1403568b4b1b10be8244e0959718b1ba92146c4d (diff) | |
ri0: preserve photo filenames with spaces
Diffstat (limited to 'src')
| -rwxr-xr-x | src/photoalbum.sh | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/photoalbum.sh b/src/photoalbum.sh index db0256a..772371b 100755 --- a/src/photoalbum.sh +++ b/src/photoalbum.sh @@ -221,35 +221,33 @@ cleanphotos() { scalephotos() { local destphoto - local destphoto_nospace local dirname local photo while IFS= read -r photo; do destphoto="$DIST_DIR/photos/$photo" - destphoto_nospace="${destphoto// /_}" dirname=$(dirname "$destphoto") mkdir -p "$dirname" - if [ -f "$destphoto_nospace" ]; then - echo "Already exists: $destphoto_nospace" + if [ -f "$destphoto" ]; then + echo "Already exists: $destphoto" continue fi - echo "Processing $photo to $destphoto_nospace" + echo "Processing $photo to $destphoto" if [ -n "${HEIGHT:-}" ]; then # Scale down size. imagemagick \ "$INCOMING_DIR/$photo" \ -auto-orient \ -geometry "$HEIGHT" \ - "$destphoto_nospace" + "$destphoto" else # Keep original size. imagemagick \ "$INCOMING_DIR/$photo" \ -auto-orient \ - "$destphoto_nospace" + "$destphoto" fi done < <( find "$INCOMING_DIR" -maxdepth 1 -type f -printf '%f\n' \ |
