Skip to content
Merged
Show file tree
Hide file tree
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
6 changes: 4 additions & 2 deletions AddonManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -845,9 +845,11 @@ def revert_to_backup(addon: Addon) -> None:
def delete_old_backups(backups) -> None:
"""Delete old backups found in the Mod directory."""
for backup in backups:
full_path = os.path.join(fci.DataPaths().mod_dir, backup)
full_path = str(os.path.join(fci.DataPaths().mod_dir, backup))
Copy link

Copilot AI Aug 14, 2025

Choose a reason for hiding this comment

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

The explicit str() conversion is unnecessary since os.path.join() already returns a string. This adds unnecessary complexity without providing any benefit.

Suggested change
full_path = str(os.path.join(fci.DataPaths().mod_dir, backup))
full_path = os.path.join(fci.DataPaths().mod_dir, backup)

Copilot uses AI. Check for mistakes.
if os.path.exists(full_path):
shutil.rmtree(full_path, ignore_errors=True)
success = utils.rmdir(full_path)
if not success:
fci.Console.PrintError(f"Failed to delete {full_path}\n")


# @}
4 changes: 2 additions & 2 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<name>Addon Manager</name>
<description>Tool to install workbenches, macros, themes, etc.</description>
<icon>Resources/icons/addon_manager.svg</icon>
<version>2025.08.08</version>
<date>2025-08-08</date>
<version>2025.08.13</version>
<date>2025-08-13</date>
<maintainer email='chennes@freecad.org'>Chris Hennes</maintainer>
<author email = 'yorik@uncreated.net'>Yorik van Havre</author>
<author>Jonathan Wiedemann</author>
Expand Down