Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion addonmanager_freecad_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,9 @@ def __init__(self):
if self.mod_dir is None:
self.mod_dir = os.path.join(getUserAppDataDir(), "Mod")
if self.cache_dir is None:
self.cache_dir = getUserCachePath()
# Anytime the cache format changes, increment this version number so we don't
# interfere with old versions.
self.cache_dir = os.path.join(getUserCachePath(), "AddonManager2026-1")
Comment on lines +244 to +246
Copy link

Copilot AI Feb 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cache "version number" is currently embedded directly in the directory name ("AddonManager2026-1"), which makes it easy to forget to update consistently and also makes the intent less clear than an explicit cache-format version constant. Consider introducing a dedicated constant (e.g., CACHE_FORMAT_VERSION) and composing the directory name from it so future cache format bumps are a one-line change and the naming scheme stays consistent.

Copilot uses AI. Check for mistakes.
if self.macro_dir is None:
self.macro_dir = getUserMacroDir(True)
if self.home_dir is None:
Expand Down
Loading