Hi, I have a daemon that spawns NSTasks on request. A task is passed a number of paths to process. These paths are pased correctly to the task, and in the task I can correctly extract the path string from optarg. When I try to turn the path into a file url however, the resulting URL is not correct.
For instance: I create a string from the argument: NSString *path = [[[NSString alloc] initWithBytes:(UInt8 *)optarg length:strlen(optarg) encoding:NSMacOSRomanStringEncoding] stringByExpandingTildeInPath]; At this point path is "/Volumes/MyDisk/Users/sonata/Desktop/Stash/BPSystemStartup.pdf" When I subsequently call [NSURL fileURLWithPath:path] the result is "%20%22/Volumes/MyDisk/Users/sonata/Desktop/Stash/BPSystemStartup.pdf%22 -- /Volumes/MyDisk/Users/sonata/Documents/Xcode Projects/builds/Debug/" The task launched by NSTask is a command line app that works just fine when run on its own (e.g. from the terminal). The issue only happens when launching the command line app through NSTask. Any pointers to why this happens? António ----------------------------------------------------------- Don't believe everything you think ----------------------------------------------------------- _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com