Skip to content

Commit 80839cf

Browse files
committed
🐛 Ensure root for 'M503 C'
1 parent c25a673 commit 80839cf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Marlin/src/gcode/eeprom/M500-M504.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include "../../inc/MarlinConfig.h"
2727

2828
#if ENABLED(CONFIGURATION_EMBEDDING)
29-
#include "../../sd/SdBaseFile.h"
29+
#include "../../sd/cardreader.h"
3030
#include "../../mczip.h"
3131
#endif
3232

@@ -69,7 +69,7 @@ void GcodeSuite::M502() {
6969
SdBaseFile file;
7070
const uint16_t size = sizeof(mc_zip);
7171
// Need to create the config size on the SD card
72-
if (file.open("mc.zip", O_WRITE|O_CREAT) && file.write(pgm_read_ptr(mc_zip), size) != -1 && file.close())
72+
if (file.open(card.getroot(), "mc.zip", O_WRITE|O_CREAT) && file.write(pgm_read_ptr(mc_zip), size) != -1 && file.close())
7373
SERIAL_ECHO_MSG("Configuration saved as 'mc.zip'");
7474
}
7575
#endif

0 commit comments

Comments
 (0)