macfsevents icon indicating copy to clipboard operation
macfsevents copied to clipboard

Race conditions with snapshot

Open junkblocker opened this issue 13 years ago • 2 comments

Assuming we have a somewhat deep directory structure at dir_a which has some directory dir_y under it. It is very easy to generate a KeyError by doing the following

% mv dir_a dir_new ; rm -rf dir_new/some/levels/here/dir_y

Traceback (most recent call last):
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/threading.py", line 552, in __bootstrap_inner
    self.run()
  File "/Library/Python/2.7/site-packages/fsevents.py", line 44, in run
    _fsevents.loop(self)
  File "/Library/Python/2.7/site-packages/fsevents.py", line 128, in __call__
    snapshot = self.snapshots[path]
KeyError: '/Users/xxxx/tmp/dir_new/some/levels/here/dir_y'

junkblocker avatar Sep 30 '12 03:09 junkblocker

same problem +1

SamLiu79 avatar Oct 22 '12 01:10 SamLiu79

Same here. I can replicate with consistency by doing rm -rf node_modules and npm install on a large node project

stephentripco avatar Dec 13 '19 12:12 stephentripco