• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: FSEvents bug?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: FSEvents bug?
      • From: Steve Gehrman <email@hidden>
References: 
 >FSEvents bug? (From: Steve Gehrman <email@hidden>)

  • Prev by Date: FSEvents bug?
  • Next by Date: Re: FSEvents bug?
  • Previous by thread: FSEvents bug?
  • Next by thread: Re: FSEvents bug?
  • Index(es):
    • Date
    • Thread