PFW-1553 fix regression where SD card file is not closed when stopping paused print
When a print is paused, card.sdprinting is set to false. Instead we can check if the SD card has been mounted and try to close the file. The closefile() method will check internally whether or not the file is open.
This commit is contained in:
parent
8fa97cffda
commit
abcb1017f3
|
|
@ -5709,7 +5709,7 @@ void print_stop(bool interactive)
|
|||
// called by the main loop one iteration later.
|
||||
UnconditionalStop();
|
||||
|
||||
if (card.sdprinting) {
|
||||
if (card.mounted) {
|
||||
// Reset the sd status
|
||||
card.sdprinting = false;
|
||||
card.closefile();
|
||||
|
|
|
|||
Loading…
Reference in New Issue