Merge pull request #8296 from pypewpew/reset-cwd
Reset cwd before looking for files to run
This commit is contained in:
commit
babd2dec45
5
main.c
5
main.c
@ -68,6 +68,8 @@
|
||||
#include "shared-bindings/microcontroller/Processor.h"
|
||||
#include "shared-bindings/supervisor/Runtime.h"
|
||||
|
||||
#include "shared-bindings/os/__init__.h"
|
||||
|
||||
#if CIRCUITPY_ALARM
|
||||
#include "shared-bindings/alarm/__init__.h"
|
||||
#endif
|
||||
@ -434,6 +436,9 @@ STATIC bool run_code_py(safe_mode_t safe_mode, bool *simulate_reset) {
|
||||
usb_setup_with_vm();
|
||||
#endif
|
||||
|
||||
// Make sure we are in the root directory before looking at files.
|
||||
common_hal_os_chdir("/");
|
||||
|
||||
// Check if a different run file has been allocated
|
||||
if (next_code_allocation) {
|
||||
next_code_info_t *info = ((next_code_info_t *)next_code_allocation->ptr);
|
||||
|
Loading…
x
Reference in New Issue
Block a user