Bug fix for missing RAW images during export

This commit is contained in:
Rhet Turnbull 2022-12-16 06:13:12 -08:00
parent a3aee63eab
commit 8b9af7be67
2 changed files with 7 additions and 3 deletions

View File

@ -534,7 +534,12 @@ class PhotoExporter:
)
else:
# guess at most likely raw name
raw_ext = get_preferred_uti_extension(self.photo.uti_raw) or "raw"
raw_ext = (
get_preferred_uti_extension(self.photo.uti_raw)
if self.photo.uti_raw
else "raw"
)
raw_ext = raw_ext or "raw"
raw_name = dest.parent / f"{dest.stem}.{raw_ext}"
all_results.missing.append(raw_name)
verbose(

View File

@ -809,8 +809,7 @@ class PhotoInfo:
if self._db._photos_ver < 7:
return self._info["UTI_raw"]
rawpath = self.path_raw
if rawpath:
if rawpath := self.path_raw:
return get_uti_for_extension(pathlib.Path(rawpath).suffix)
else:
return None