Re: FSEvents bug?
Re: FSEvents bug?
- Subject: Re: FSEvents bug?
- From: James Bucanek <email@hidden>
- Date: Tue, 22 Sep 2009 08:32:42 -0700
Steve Gehrman <mailto:email@hidden> wrote (Tuesday,
September 22, 2009 3:57 AM -0700):
I see at the very least an inconsistency in FSEvents. I'm
watching the root of a device on the boot disk, the relative
path is "". I'm using FSEventStreamCreateRelativeToDevice
If I'm at "/" and type "touch test"
I get an FSEvent with the path "", that works fine.
But when I do an "rm test"
I get an FSEvent with the path "/". My code is watching for path "" so it fails.
Is this the expected behavior or a bug?
I don't know if it's a bug or not, but some FSEvent paths seem
to be path fragments while others are full POSIX paths, that may
or may not have a trailing '/'.
In my code, I ended up "normalizing" all directory paths (watch
and event) so that they all have a trailing space:
if (![path endsWithString:@"/"])
path = [path stringByAppendingString:@"/"];
I haven't had any problems.
James
--
James Bucanek
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Filesystem-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden