diff --git a/src/Mod/Arch/ArchCommands.py b/src/Mod/Arch/ArchCommands.py index abf325a8c..4d25e0673 100644 --- a/src/Mod/Arch/ArchCommands.py +++ b/src/Mod/Arch/ArchCommands.py @@ -544,10 +544,14 @@ def mergeCells(objectslist): def download(url,force=False): '''downloads a file from the given URL and saves it in the - user directory. Returns the path to the saved file''' + macro path. Returns the path to the saved file''' import urllib2, os name = url.split('/')[-1] - filepath = os.path.join(FreeCAD.ConfigGet("UserAppData"),name) + p = FreeCAD.ParamGet("User parameter:BaseApp/Preferences/Macro") + macropath = p.GetString("MacroPath","") + if not macropath: + macropath = FreeCAD.ConfigGet("UserAppData") + filepath = os.path.join(macropath,name) if os.path.exists(filepath) and not(force): return filepath try: