Zaczero / google-photos-takeout.sh

🔧 Fixes Google Photos Takeout metadata
GNU Affero General Public License v3.0
11 stars 4 forks source link

Files not found, but they are listed [via git bash on windows] #7

Open FollowTheWizard opened 2 months ago

FollowTheWizard commented 2 months ago

Hi thanks for providing the script!

i try to run it via git bash on windows and i am facing this issue:

"$ sh google-photos-takeout.sh [1/2] ./Google Fotos/Photos from 2021/IMG_2662.JPG.json : ./Google Fotos/Photos from 2021/IMG_2662.JPG [2/2] ./Google Fotos/Photos from 2021/IMG_2666.JPG.json : ./Google Fotos/Photos from 2021/IMG_2666.JPG Found 2 unique files to process Looks correct? [y/N] y ======== ./Google Fotos/Photos from 2021/IMG_2662.JPG [1/2] Warning: Error opening file - ./Google Fotos/Photos from 2021/IMG_2662.JPG.json Error: File not found - ./Google Fotos/Photos from 2021/IMG_2662.JPG ======== ./Google Fotos/Photos from 2021/IMG_2666.JPG [2/2] Warning: Error opening file - ./Google Fotos/Photos from 2021/IMG_2666.JPG.json Error: File not found - ./Google Fotos/Photos from 2021/IMG_2666.JPG 0 image files updated 2 files weren't updated due to errors Delete all JSON files? [y/N] n "

jq.exe and exiftool are installed and available via cmd.

thanks in advance.

Zaczero commented 2 months ago

Hey there! This seems to originate from ExifTool (this command). I am not experienced in Windows development, so I won't be much use here - at first glance, it seems correct. I have two ideas as to what may be happening, but those are just guesses.

  1. When ExifTool starts, it has a different working directory than the executing bash script, which may cause it not to resolve relative paths. However, if that were the case, it would likely result in the breakage of many other scripts, so it's quite unlikely.
  2. ExifTool requires paths to be in Windows format, with "\\" instead of "/" directory separators. But Windows examples I found online seem to work with POSIX path format. So again, idk.