Skip to content

Commit 180b485

Browse files
committed
Enable creation of code.py only for full builds
1 parent 262cfd4 commit 180b485

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

supervisor/shared/filesystem.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,10 +75,15 @@ static void make_sample_code_file(FATFS *fatfs) {
7575
UINT char_written = 0;
7676
const byte buffer[] = "print('Hello World!')\n";
7777

78+
#if CIRCUITPY_FULL_BUILD == 0
79+
make_empty_file(&vfs_fat->fatfs, "/code.py");
80+
81+
#else
7882
//Create or modify existing code.py file
7983
f_open(fatfs, &fs, "/code.py", FA_WRITE | FA_CREATE_ALWAYS);
8084
f_write(&fs, buffer, sizeof(buffer) - 1, &char_written);
8185
f_close(&fs);
86+
#endif
8287
}
8388

8489
// we don't make this function static because it needs a lot of stack and we

0 commit comments

Comments
 (0)