Skip to content

Commit fc214fb

Browse files
committed
boot.py change of filesystem writability would get overridden.
1 parent d32349c commit fc214fb

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

main.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,10 @@ int __attribute__((used)) main(void) {
311311
filesystem_writable_by_python(true);
312312
f_open(fs, boot_output_file, CIRCUITPY_BOOT_OUTPUT_FILE, FA_WRITE | FA_CREATE_ALWAYS);
313313

314+
// Switch the filesystem back to non-writable now instead of later,
315+
// since boot.py might change it back to writable.
316+
filesystem_writable_by_python(false);
317+
314318
// Write version info to boot_out.txt.
315319
mp_hal_stdout_tx_str(MICROPY_FULL_VERSION_INFO);
316320
mp_hal_stdout_tx_str("\r\n");
@@ -327,7 +331,6 @@ int __attribute__((used)) main(void) {
327331
filesystem_flush();
328332
boot_output_file = NULL;
329333
}
330-
filesystem_writable_by_python(false);
331334
#endif
332335

333336
// Reset to remove any state that boot.py setup. It should only be used to

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy