Skip to content

Commit

Permalink
Fix exports migration when there is none (blakeblackshear#14761)
Browse files Browse the repository at this point in the history
  • Loading branch information
felipecrs authored Nov 3, 2024
1 parent 77ec86d commit 9755fa0
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions frigate/util/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,15 @@ def migrate_frigate_config(config_file: str):
previous_version = "0.14"

logger.info("Migrating export file names...")
for file in os.listdir(EXPORT_DIR):
if "@" not in file:
continue

new_name = file.replace("@", "_")
os.rename(
os.path.join(EXPORT_DIR, file), os.path.join(EXPORT_DIR, new_name)
)
if os.path.isdir(EXPORT_DIR):
for file in os.listdir(EXPORT_DIR):
if "@" not in file:
continue

new_name = file.replace("@", "_")
os.rename(
os.path.join(EXPORT_DIR, file), os.path.join(EXPORT_DIR, new_name)
)

if previous_version < "0.15-0":
logger.info(f"Migrating frigate config from {previous_version} to 0.15-0...")
Expand Down

0 comments on commit 9755fa0

Please sign in to comment.