diff --git a/Marlin/src/gcode/sd/M1001.cpp b/Marlin/src/gcode/sd/M1001.cpp index 8e24b6049..406cd074c 100644 --- a/Marlin/src/gcode/sd/M1001.cpp +++ b/Marlin/src/gcode/sd/M1001.cpp @@ -65,7 +65,7 @@ */ void GcodeSuite::M1001() { // If there's another auto#.g file to run... - if (TERN(NO_SD_AUTOSTART, false, !card.autofile_check())) return; + if (TERN(NO_SD_AUTOSTART, false, card.autofile_check())) return; // Purge the recovery file... TERN_(POWER_LOSS_RECOVERY, recovery.purge()); diff --git a/Marlin/src/sd/cardreader.cpp b/Marlin/src/sd/cardreader.cpp index fe8bc4879..88b42f836 100644 --- a/Marlin/src/sd/cardreader.cpp +++ b/Marlin/src/sd/cardreader.cpp @@ -755,10 +755,10 @@ void CardReader::write_command(char * const buf) { * - After finishing the previous auto#.g file * - From the LCD command to begin the auto#.g files * - * Return 'true' if there was nothing to do + * Return 'true' if an auto file was started */ bool CardReader::autofile_check() { - if (!autofile_index) return true; + if (!autofile_index) return false; if (!isMounted()) mount(); @@ -773,11 +773,11 @@ void CardReader::write_command(char * const buf) { cdroot(); openAndPrintFile(autoname); autofile_index++; - return false; + return true; } } autofile_cancel(); - return true; + return false; } #endif