mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-22 00:22:57 -05:00
inotify queues IN_MOVED_FROM and IN_MOVED_TO of a rename one after the other. The watcher thread could read the first before the second was queued and report a rename inside the directory as a move to another directory (NOTE_WRITE | NOTE_EXTEND instead of NOTE_WRITE), which made guest_kqueue abort on loaded runners. The watcher now reads the queue until it is empty and, when a move half has no partner, calls getdents64 on the directory before reading again: that takes the directory lock rename holds until both halves are queued.