aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJustin Schuh <jschuh@users.noreply.github.com>2022-03-01 15:58:59 -0800
committerKevinOConnor <kevin@koconnor.net>2022-03-18 11:44:33 -0400
commit1390b4d600c8339092582ed2cb3fe4b4bd1edb48 (patch)
tree373503e8bf1fff4b08731fdf3bf764d733519046
parentb4b19b8fc127051e12a9891990070b98bc6eac76 (diff)
downloadkutter-1390b4d600c8339092582ed2cb3fe4b4bd1edb48.tar.gz
kutter-1390b4d600c8339092582ed2cb3fe4b4bd1edb48.tar.xz
kutter-1390b4d600c8339092582ed2cb3fe4b4bd1edb48.zip
virtual_sdcard: Allow spaces in file path for M23
Also makes M23 work normally with rename_existing. Signed-off-by: Justin Schuh <code@justinschuh.com>
-rw-r--r--klippy/extras/virtual_sdcard.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/klippy/extras/virtual_sdcard.py b/klippy/extras/virtual_sdcard.py
index 265a13f9..397c6513 100644
--- a/klippy/extras/virtual_sdcard.py
+++ b/klippy/extras/virtual_sdcard.py
@@ -158,13 +158,7 @@ class VirtualSD:
if self.work_timer is not None:
raise gcmd.error("SD busy")
self._reset_file()
- try:
- orig = gcmd.get_commandline()
- filename = orig[orig.find("M23") + 4:].split()[0].strip()
- if '*' in filename:
- filename = filename[:filename.find('*')].strip()
- except:
- raise gcmd.error("Unable to extract filename")
+ filename = gcmd.get_raw_command_parameters().strip()
if filename.startswith('/'):
filename = filename[1:]
self._load_file(gcmd, filename)