13 Commits

Author SHA1 Message Date
Corey Johnson
5e1701f8db Call stringByStandardizingPath on moved paths 2013-03-01 13:54:19 -08:00
Nathan Sobo
cb4d2f63ad Log errno when path watcher fails to open an fd 2013-01-02 03:44:25 -07:00
Nathan Sobo
f0ee7a06f7 Log a better error upon failing to open an fd in path watcher
I've been struggling with some intermittent failures, so I'm hoping the
code returned from `open` might shed some light on the issue.
2013-01-02 03:18:50 -07:00
Corey Johnson & Nathan Sobo
702b8047e4 Unwatch all paths after each test 2012-11-29 15:31:05 -08:00
Corey Johnson & Nathan Sobo
db78d6a7e5 Ensure PathWatcher isn't watching anything at the end of each spec
This replaces the old functionality of ensuring no files or directories have subscriptions in javascript. We allow this now, but we just don't allow leaked watches at the native layer.
2012-11-28 17:16:15 -07:00
Corey Johnson & Nathan Sobo
d6009df44e Buffers retain path when file is deleted and can be re-saved
Path watching resumes once the file is saved again. This commit allows files to be created for as-yet nonexistent paths. We won't call `$native.watchPath` until we have at least 1 subscription to the file in JS and the file exists on disk.

Also, we moved execution of the path watcher callbacks until after the callbacks data structure is updated in order to avoid confusing behavior in specs.
2012-11-28 16:55:10 -07:00
Corey Johnson & Nathan Sobo
f9563f5e55 Fix PathWatcher failures
Now when a file is removed, we always remove its subscriptions and its kevent.
2012-11-19 13:16:14 -07:00
Corey Johnson
0ba0813f7c Clean up lurking pathwatcher bugs 2012-11-16 15:26:55 -08:00
Corey Johnson
69e04d57aa Remove NSLogs from PathWatcher 2012-11-15 14:37:49 -08:00
Corey Johnson
173a615f07 Clean up PathWatcher
Uses the path to store the callback instead of the fd. This
2012-11-15 14:31:49 -08:00
Corey Johnson & Nathan Sobo
973c69a043 Ignore rename events for files that have already been deleted 2012-10-26 11:15:22 -06:00
Nathan Sobo
edf7f6611f Avoid crash in PathWatcher when renaming to a null path
I added some logging for the time being, because this seems weird, but at least it doesn't crash anymore.
2012-10-25 14:20:49 -06:00
Corey Johnson & Nathan Sobo
e8aa1524c7 Rename atom folder to native 2012-08-27 13:21:59 -07:00