diff --git a/moonraker/plugins/gcode_apis.py b/moonraker/plugins/gcode_apis.py index 01115ed..197d38c 100644 --- a/moonraker/plugins/gcode_apis.py +++ b/moonraker/plugins/gcode_apis.py @@ -52,9 +52,9 @@ class GCodeAPIs: filename = args.get('filename') # XXX - validate that file is on disk - if filename[0] != '/': - filename = '/' + filename - script = "M23 " + filename + "\nM24" + if filename[0] == '/': + filename = filename[1:] + script = "SDCARD_PRINT_FILE FILENAME=" + filename return await self._send_gcode(script) async def gcode_restart(self, path, method, args):