diff --git a/laser/laser.inx b/laser/laser.inx
index 4796428..ba91e63 100644
--- a/laser/laser.inx
+++ b/laser/laser.inx
@@ -16,7 +16,6 @@
-- Choose Output Directory --
output.gcode
- false
true
diff --git a/laser/laser.py b/laser/laser.py
index 9576d84..688b6b4 100644
--- a/laser/laser.py
+++ b/laser/laser.py
@@ -49,20 +49,17 @@ def effect(self):
TOLERANCES["approximation"] = float(self.options.approximation_tolerance.replace(',', '.'))
# Construct output path
- # Construct output path
- if self.options.filename_dynamic and self.document_path():
+ if self.options.filename:
+ output_path = os.path.join(self.options.directory, self.options.filename)
+ if '.' not in output_path:
+ output_path += ".gcode"
+ else:
filename, extension = self.document_path().split('.')
filename = filename.split('/')[-1] + '.gcode'
output_path = os.path.join(self.options.directory, filename)
- else:
- output_path = os.path.join(self.options.directory, self.options.filename)
if self.options.filename_suffix:
- try:
- filename, extension = output_path.split('.')
- except:
- self.msg("Error in output directory!")
- exit(1)
+ filename, extension = output_path.split('.')
n = 1
while os.path.isfile(output_path):