Only basename is used for the name

CURA-1680
This commit is contained in:
Jaime van Kessel 2016-07-15 12:10:09 +02:00
parent 951e7bf629
commit 806197f56b

View File

@ -81,6 +81,9 @@ class PrintInformation(QObject):
@pyqtSlot(str) @pyqtSlot(str)
def setJobName(self, name): def setJobName(self, name):
# Ensure that we don't use entire path but only filename
name = os.path.basename(name)
# when a file is opened using the terminal; the filename comes from _onFileLoaded and still contains its # when a file is opened using the terminal; the filename comes from _onFileLoaded and still contains its
# extension. This cuts the extension off if necessary. # extension. This cuts the extension off if necessary.
name = os.path.splitext(name)[0] name = os.path.splitext(name)[0]