Missing updates through renamed parent directory
Author: valoqCreated May 11, 2025Updated May 31, 2025
Labelsv2
Describe the bug
When a path is watched by fsnotify and a parent node is renamed, subsequent updates are incorrectly using the old path name.
Upstream bug and event logs: https://github.com/gokcehan/lf/issues/1903#issuecomment-2869172041 https://github.com/gokcehan/lf/issues/1903#issuecomment-2869823268
Code to Reproduce
The issue can be easily reproduced using lf with the watch feature that uses fsnotify
lf -config /dev/null -command 'set watch true'
File operations to reproduce
lf -config /dev/null -command 'set watch true'
create directory "test" and a sub directory "test/a"
create a "testfile" in test
rename test to test2
(using lf) move "testfile" to test/a
"/test/a" will remain empty until manual refresh is triggered
Which operating system and version are you using?
Arch Linux
Which fsnotify version are you using?
1.9.0
Did you try the latest main branch?
No
Source: fsnotify/fsnotify