Changed renaming to sd filenames to also work properly with very short names (and names with more .) as at least Marlin seems to hiccup on something like "file.gco.gco"

This commit is contained in:
Gina Häußge 2013-09-22 16:04:36 +02:00
parent 4ea2345eda
commit 6b2912b0e2

View file

@ -494,7 +494,10 @@ class Printer():
def streamSdFile(self, filename, path):
if not self._comm or self._comm.isBusy():
return
self._comm.startFileTransfer(path, filename[:8].lower() + ".gco")
sdFilename = filename[:filename.find(".")].lower()
if len(sdFilename) > 8:
sdFilename = sdFilename[:8]
self._comm.startFileTransfer(path, sdFilename + ".gco")
def deleteSdFile(self, filename):
if not self._comm: