Skip to content

Commit

Permalink
Create Macro dir for AddonManager if nonexistent
Browse files Browse the repository at this point in the history
This commit implements the directory-existence-check already used for
the Mod folder when AddonManager attempts to install something into it
and is associated with bug #00029998
  • Loading branch information
kkremitzki committed Apr 5, 2017
1 parent a253af0 commit c902422
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Mod/AddonManager/AddonManager.py
Expand Up @@ -205,6 +205,8 @@ def install(self):
self.install_worker.start()
elif self.tabWidget.currentIndex() == 1:
macropath = FreeCAD.ParamGet('User parameter:BaseApp/Preferences/Macro').GetString("MacroPath",os.path.join(FreeCAD.ConfigGet("UserAppData"),"Macro"))
if not os.path.isdir(macropath):
os.makedirs(macropath)
macro = self.macros[self.listMacros.currentRow()]
if len(macro) < 5:
self.labelDescription.setText(QtGui.QApplication.translate("AddonsInstaller", "Unable to install", None, QtGui.QApplication.UnicodeUTF8))
Expand Down

0 comments on commit c902422

Please sign in to comment.