Merge pull request #8339 from bill88t/untrash

`/.Trash-1000` on filesystem creation.
This commit is contained in:
Scott Shawcroft 2023-08-28 11:17:59 -07:00 committed by GitHub
commit 74066ef9fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 2 deletions

View File

@ -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