File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
ports/atmel-samd/supervisor Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 42
42
fs_user_mount_t fs_user_mount_flash ;
43
43
mp_vfs_mount_t mp_vfs_mount_flash ;
44
44
45
+ static void make_empty_file (FATFS * fatfs , const char * path ) {
46
+ FIL fp ;
47
+ f_open (fatfs , & fp , path , FA_WRITE | FA_CREATE_ALWAYS );
48
+ f_close (& fp );
49
+ }
50
+
45
51
// we don't make this function static because it needs a lot of stack and we
46
52
// want it to be executed without using stack within main() function
47
53
void filesystem_init (bool create_allowed ) {
@@ -65,6 +71,14 @@ void filesystem_init(bool create_allowed) {
65
71
66
72
// set label
67
73
f_setlabel (& vfs_fat -> fatfs , "CIRCUITPY" );
74
+
75
+ // inhibit file indexing on MacOS
76
+ f_mkdir (& vfs_fat -> fatfs , "/.fseventsd" );
77
+ make_empty_file (& vfs_fat -> fatfs , "/.metadata_never_index" );
78
+ make_empty_file (& vfs_fat -> fatfs , "/.Trashes" );
79
+ make_empty_file (& vfs_fat -> fatfs , "/.feventsd/no_log" );
80
+
81
+ // and ensure everything is flushed
68
82
flash_flush ();
69
83
} else if (res != FR_OK ) {
70
84
return ;
You can’t perform that action at this time.
0 commit comments