Skip to content

Commit

Permalink
AddonManager: Check that the addon folder actually contains files bef…
Browse files Browse the repository at this point in the history
…ore declaring it installed
  • Loading branch information
yorikvanhavre committed Aug 12, 2019
1 parent 683397b commit 347b818
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Mod/AddonManager/addonmanager_workers.py
Expand Up @@ -91,10 +91,11 @@ def run(self):
if url:
addondir = moddir + os.sep + name
#print ("found:",name," at ",url)
if not os.path.exists(addondir):
state = 0
else:
if os.path.exists(addondir) and os.listdir(addondir):
# make sure the folder exists and it contains files!
state = 1
else:
state = 0
repos.append([name,url,state])
# querying custom addons
customaddons = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Addons").GetString("CustomRepositories","").split("\n")
Expand Down

0 comments on commit 347b818

Please sign in to comment.