Minor improvement to getFileData
This commit is contained in:
1 parent
de635ae25f
commit
6d703d236a
1 file changed
+3
-8
@@ -217,20 +217,15 @@ class GcodeManager:
|
||||
return files
|
||||
|
||||
def getFileData(self, filename):
|
||||
from octoprint.filemanager.types import FileTypes
|
||||
|
||||
from octoprint.util import isSTLFileName
|
||||
|
||||
if not filename:
|
||||
return
|
||||
|
||||
filename = self._getBasicFilename(filename)
|
||||
|
||||
fileType = filename.rsplit(".", 1)[1]
|
||||
|
||||
if not fileType:
|
||||
return None
|
||||
|
||||
# TODO: Make this more robust when STLs will be viewable from the client
|
||||
if fileType != FileTypes.GCODE:
|
||||
if isSTLFileName(filename):
|
||||
return
|
||||
|
||||
absolutePath = self.getAbsolutePath(filename)
|
||||
|
||||
Reference in new issue
Block a user