Merge pull request #675 from kkremitzki/issue0002998

Create Macro dir for AddonManager if nonexistent
This commit is contained in:
Yorik van Havre
2017-04-05 13:15:02 -03:00
committed by GitHub

View File

@@ -205,6 +205,8 @@ class AddonsInstaller(QtGui.QDialog):
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))