mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-03-01 04:17:02 +00:00
🐛 Ensure root for 'M503 C'
This commit is contained in:
parent
c25a6737c6
commit
80839cf020
1 changed files with 2 additions and 2 deletions
|
@ -26,7 +26,7 @@
|
||||||
#include "../../inc/MarlinConfig.h"
|
#include "../../inc/MarlinConfig.h"
|
||||||
|
|
||||||
#if ENABLED(CONFIGURATION_EMBEDDING)
|
#if ENABLED(CONFIGURATION_EMBEDDING)
|
||||||
#include "../../sd/SdBaseFile.h"
|
#include "../../sd/cardreader.h"
|
||||||
#include "../../mczip.h"
|
#include "../../mczip.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -69,7 +69,7 @@ void GcodeSuite::M502() {
|
||||||
SdBaseFile file;
|
SdBaseFile file;
|
||||||
const uint16_t size = sizeof(mc_zip);
|
const uint16_t size = sizeof(mc_zip);
|
||||||
// Need to create the config size on the SD card
|
// Need to create the config size on the SD card
|
||||||
if (file.open("mc.zip", O_WRITE|O_CREAT) && file.write(pgm_read_ptr(mc_zip), size) != -1 && file.close())
|
if (file.open(card.getroot(), "mc.zip", O_WRITE|O_CREAT) && file.write(pgm_read_ptr(mc_zip), size) != -1 && file.close())
|
||||||
SERIAL_ECHO_MSG("Configuration saved as 'mc.zip'");
|
SERIAL_ECHO_MSG("Configuration saved as 'mc.zip'");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in a new issue