diff --git a/supervisor/shared/filesystem.c b/supervisor/shared/filesystem.c index 345f55f2f1..f6ade7cbba 100644 --- a/supervisor/shared/filesystem.c +++ b/supervisor/shared/filesystem.c @@ -127,9 +127,15 @@ bool filesystem_init(bool create_allowed, bool force_create) { if (res != FR_OK) { return false; } - make_empty_file(&vfs_fat->fatfs, "/.metadata_never_index"); - make_empty_file(&vfs_fat->fatfs, "/.Trashes"); make_empty_file(&vfs_fat->fatfs, "/.fseventsd/no_log"); + make_empty_file(&vfs_fat->fatfs, "/.metadata_never_index"); + + // Prevent storing trash on all OSes. + make_empty_file(&vfs_fat->fatfs, "/.Trashes"); // MacOS + make_empty_file(&vfs_fat->fatfs, "/.Trash-1000"); // Linux, XDG trash spec: + // https://specifications.freedesktop.org/trash-spec/trashspec-latest.html + + #if CIRCUITPY_OS_GETENV make_empty_file(&vfs_fat->fatfs, "/settings.toml"); #endif