• 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: NSTask launchpath - space
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSTask launchpath - space


  • Subject: Re: NSTask launchpath - space
  • From: "Alastair J.Houghton" <email@hidden>
  • Date: Mon, 6 Oct 2003 09:33:58 +0100

On Monday, October 6, 2003, at 12:19 am, David Remahl wrote:

On 5 okt 2003, at 23.23, Alastair J.Houghton wrote:

On Sunday, October 5, 2003, at 08:06 pm, David Dauer wrote:

[theTask setLaunchPath:@"/Volumes/My\ Mac/usr/tool"]

I don't think that's enough "\" characters; C will change "\ " back into " " in the string. Try using two backslash characters or surrounding the entire path with quotes. Regardless of whether that works or not, you should probably report it to Apple as a bug at

http://bugreporter.apple.com

Kind regards,

Alastair.

Try _no_ backslashes. They're not needed in the launch path.

David already indicated that he'd tried without backslashes, and that it didn't work. I'm sure I remember someone saying that there was a bug in one of the Cocoa APIs in that it required quoting to deal with filenames containing spaces, but I can't find the message in the list archives and I can't remember which API was being discussed.

In the shell, they are used to escape the spaces, which would otherwise act as an argument delimiter. No such need in the launch path passed to NSTask. The same is true for the elements in the arguments array.

I would also have expected it to work without any quoting or escaping, but David's original post said it didn't. Maybe there was something else wrong with the path though.

Kind regards,

Alastair.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: NSTask launchpath - space (From: David Remahl <email@hidden>)

  • Prev by Date: Re: NSTextView question...
  • Next by Date: Re: Xcode and Info.plist
  • Previous by thread: Re: NSTask launchpath - space
  • Next by thread: Re: NSTask launchpath - space
  • Index(es):
    • Date
    • Thread