File tree 2 files changed +5
-5
lines changed 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -213,10 +213,11 @@ bool run_code_py(safe_mode_t safe_mode) {
213
213
serial_write_compressed (translate ("WARNING: Your code filename has two extensions\n" ));
214
214
}
215
215
}
216
- // Turn off the display before the heap disappears.
216
+ // Turn off the display and flush the fileystem before the heap disappears.
217
217
#if CIRCUITPY_DISPLAYIO
218
218
reset_displays ();
219
219
#endif
220
+ filesystem_flush ();
220
221
stop_mp ();
221
222
free_memory (heap );
222
223
supervisor_move_memory ();
@@ -375,6 +376,7 @@ int run_repl(void) {
375
376
} else {
376
377
exit_code = pyexec_friendly_repl ();
377
378
}
379
+ filesystem_flush ();
378
380
reset_port ();
379
381
reset_board ();
380
382
stop_mp ();
Original file line number Diff line number Diff line change @@ -29,10 +29,8 @@ void displayio_refresh_displays(void) {
29
29
if (mp_hal_is_interrupted ()) {
30
30
return ;
31
31
}
32
- // Somehow reloads from the sdcard are being lost. So, cheat and reraise.
33
- // But don't re-raise if already pending.
34
- if (reload_requested && MP_STATE_VM (mp_pending_exception ) == MP_OBJ_NULL ) {
35
- mp_raise_reload_exception ();
32
+ if (reload_requested ) {
33
+ // Reload is about to happen, so don't redisplay.
36
34
return ;
37
35
}
38
36
You can’t perform that action at this time.
0 commit comments