Skip to content

Commit

Permalink
fix: allow spaces in filenames for exiftool_runtime
Browse files Browse the repository at this point in the history
  • Loading branch information
malconsei committed Sep 20, 2023
1 parent c43c482 commit ac933d0
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,11 @@ def __init__(
"Cannot execute exiftool. Please install it from https://exiftool.org/ or you package manager, or set the environment variable MAPILLARY_TOOLS_EXIFTOOL_PATH"
)

args = (
f"{exiftool_path} -q -r -n -ee -api LargeFileSupport=1 -X {self.geotag_source_path}"
).split(" ")
if not self.geotag_source_path:
return
args = f"{exiftool_path} -q -r -n -ee -api LargeFileSupport=1 -X".split(" ")

This comment has been minimized.

Copy link
@ptpt

ptpt Sep 20, 2023

Member

exiftool_path could contain spaces as well. I'd suggest construct args with list directly.

args.append(str(self.geotag_source_path))

xml_content = subprocess.run(args, capture_output=True, text=True).stdout

self.exiftoolXmlParser = ExiftoolXmlParser(
Expand Down

0 comments on commit ac933d0

Please sign in to comment.