diff --git a/src/Mod/Path/PathScripts/PathPost.py b/src/Mod/Path/PathScripts/PathPost.py index 0799573a14..e89ccc6224 100644 --- a/src/Mod/Path/PathScripts/PathPost.py +++ b/src/Mod/Path/PathScripts/PathPost.py @@ -238,19 +238,21 @@ def resolveFileName(job, subpartname, sequencenumber): if openDialog: foo = QtGui.QFileDialog.getSaveFileName( - QtGui.QApplication.activeWindow(), "Output File", filename + QtGui.QApplication.activeWindow(), "Output File", fullPath ) if foo[0]: fullPath = foo[0] else: fullPath = None - # remove any unused substitution strings: - for s in validPathSubstitutions + validFilenameSubstitutions: - fullPath = fullPath.replace(f"%{s}", "") + if fullPath: + # remove any unused substitution strings: + for s in validPathSubstitutions + validFilenameSubstitutions: + fullPath = fullPath.replace(f"%{s}", "") + + fullPath = os.path.normpath(fullPath) + PathLog.track(fullPath) - fullPath = os.path.normpath(fullPath) - PathLog.track(fullPath) return fullPath @@ -591,7 +593,7 @@ class CommandPathPost: filenames.append(name) PathLog.track(result, gcode, name) - if result is None: + if name is None: success = False else: finalgcode += gcode