Addon Manager: Clean up backup directories

This commit is contained in:
Chris Hennes
2022-09-15 13:12:43 -05:00
parent c6f731dd47
commit d77584db10
3 changed files with 3 additions and 2 deletions

View File

@@ -231,6 +231,7 @@ class GitManager:
os.chdir(original_cwd)
raise e
os.chdir(original_cwd)
shutil.rmtree(backup_path, ignore_errors=True)
def get_remote(self, local_path) -> str:
"""Get the repository that this local path is set to fetch from"""

View File

@@ -147,7 +147,7 @@ class InstallWorkbenchWorker(QtCore.QThread):
will revert to a clean clone."""
self.status_message.emit("Updating module...")
with self.repo.git_lock:
if not os.path.exists(clonedir + os.sep + ".git"):
if not os.path.exists(os.path.join(clonedir, ".git")):
self.git_manager.repair(self.repo.url, clonedir)
try:
self.git_manager.update(clonedir)

View File

@@ -51,7 +51,7 @@
</font>
</property>
<property name="text">
<string>NOTE: If &quot;Other...&quot; is selected, the package is not in the ALLOWED_PYTHON_PACKAGES.txt file, and will not be automatically installed by the Addon Manager. Submit a PR at &lt;a href=https://github.com/FreeCAD/FreeCAD-addons&quot;&gt;https://github.com/FreeCAD/FreeCAD-addons&lt;/a&gt; to request addition of a package.</string>
<string>NOTE: If &quot;Other...&quot; is selected, the package is not in the ALLOWED_PYTHON_PACKAGES.txt file, and will not be automatically installed by the Addon Manager. Submit a PR at &lt;a href=&quot;https://github.com/FreeCAD/FreeCAD-addons&quot;&gt;https://github.com/FreeCAD/FreeCAD-addons&lt;/a&gt; to request addition of a package.</string>
</property>
<property name="wordWrap">
<bool>true</bool>