mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-15 02:59:33 +07:00
[vfs] restoring accidentally broken Linux/WSL fsnotifier event reporting routine
GitOrigin-RevId: 56212c37c8cecc9e0700acf6d02e6f278fdce360
This commit is contained in:
committed by
intellij-monorepo-bot
parent
f52408e27f
commit
bae7e84023
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -306,10 +306,10 @@ static bool register_roots(array* new_roots, array* unwatchable, array* mounts)
|
||||
|
||||
|
||||
static bool is_watchable(const char* fs) {
|
||||
// don't watch special and network filesystems
|
||||
// do not watch special and network filesystems
|
||||
return !(strncmp(fs, "dev", 3) == 0 || strcmp(fs, "proc") == 0 || strcmp(fs, "sysfs") == 0 || strcmp(fs, MNTTYPE_SWAP) == 0 ||
|
||||
(strncmp(fs, "fuse", 4) == 0 && strcmp(fs + 4, "blk") != 0 && strcmp(fs + 4, ".osxfs") != 0) ||
|
||||
strcmp(fs, "cifs") == 0 || strcmp(fs, MNTTYPE_NFS) == 0|| strcmp(fs, "9p") == 0);
|
||||
strcmp(fs, "cifs") == 0 || strcmp(fs, MNTTYPE_NFS) == 0 || strcmp(fs, "9p") == 0 ||
|
||||
(strncmp(fs, "fuse", 4) == 0 && strcmp(fs + 4, "blk") != 0 && strcmp(fs + 4, ".osxfs") != 0));
|
||||
}
|
||||
|
||||
static array* unwatchable_mounts() {
|
||||
@@ -375,8 +375,11 @@ static void report_event(const char* event, const char* path) {
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
|
||||
output(event, false);
|
||||
output(copy, true);
|
||||
fputs(event, stdout);
|
||||
fputc('\n', stdout);
|
||||
fwrite(copy, (p - copy), 1, stdout);
|
||||
fputc('\n', stdout);
|
||||
fflush(stdout);
|
||||
|
||||
if (copy != path) {
|
||||
free(copy);
|
||||
|
||||
Reference in New Issue
Block a user