don't create placeholder.txt if it'll just be empty

This commit is contained in:
Jeff Epler 2024-01-29 16:48:21 -06:00
parent 7c3adbff8f
commit 96ef9c0caf

View file

@ -143,9 +143,11 @@ bool filesystem_init(bool create_allowed, bool force_create) {
#if CIRCUITPY_SDCARDIO || CIRCUITPY_SDIOIO
res = f_mkdir(&vfs_fat->fatfs, "/sd");
#if CIRCUITPY_FULL_BUILD
MAKE_FILE_WITH_OPTIONAL_CONTENTS(&vfs_fat->fatfs, "/sd/placeholder.txt",
"This placeholder file allows mounting an SD card at /sd\n");
#endif
#endif
#if CIRCUITPY_OS_GETENV
make_empty_file(&vfs_fat->fatfs, "/settings.toml");