virtual_sdcard: Remove trailing '*' checksum indicator from M23 command

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2018-03-02 11:58:00 -05:00
parent 82a65e9f4a
commit fc60bda4d1
1 changed files with 2 additions and 0 deletions

View File

@ -59,6 +59,8 @@ class VirtualSD:
try: try:
orig = params['#original'] orig = params['#original']
filename = orig[orig.find("M23") + 4:].split()[0].strip() filename = orig[orig.find("M23") + 4:].split()[0].strip()
if '*' in filename:
filename = filename[:filename.find('*')].strip()
except: except:
raise self.gcode.error("Unable to extract filename") raise self.gcode.error("Unable to extract filename")
if filename.startswith('/'): if filename.startswith('/'):