Re: can't run app from applications folder -- permissions problem?
Re: can't run app from applications folder -- permissions problem?
- Subject: Re: can't run app from applications folder -- permissions problem?
- From: Ben Dougall <email@hidden>
- Date: Tue, 18 Apr 2006 00:28:47 +0100
On Tuesday, April 18, 2006, at 12:04 am, Lawrence Sanbourne wrote:
Could this be a problem with quoting? I'm wondering whether the
bundle's resource path needs to be quoted within the string:
system( [[NSString stringWithFormat:@"\"%@/CpMac\" -p \"%@\" \"%@\"",
[[NSBundle
mainBundle] resourcePath], origFile, backupTmpFile] cString] );
Note that in this case, if the path contains double quotes or new
lines, you're in trouble. You probably want to take each of the path
strings and run a method on them (maybe in a category on NSString)
that escapes special characters as needed.
yes, that was it -- thanks. what makes me really stupid was i knew i
hadn't dealt with the possibility of spaces, wrote a message in the
About window "warning, spaces in paths probably will cause problems"
(couldn't be bothered to think how to deal with them and it really
isn't a proper app), then later dropped my app in a folder in the
applications folder that starts with a space character and resorted to
asking on here what the problem was.
thanks, ben.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden