Enhance comments for migration logic in load function

Added comments to clarify migration handling in load function.
This commit is contained in:
2026-01-02 01:17:47 +01:00
committed by GitHub
parent c1ec676e2e
commit 726430ba90

View File

@@ -45,6 +45,10 @@ def load_json(path):
try: try:
with open(path, 'r') as f: with open(path, 'r') as f:
data = json.load(f) data = json.load(f)
# Ensure migration happens if loading old file
# We don't change structure here, HistoryTree class handles logic
return data, get_file_mtime(path) return data, get_file_mtime(path)
except: except:
return DEFAULTS.copy(), 0 return DEFAULTS.copy(), 0