|
From: Andrew M. <fit...@us...> - 2008-06-24 20:18:43
|
Update of /cvsroot/radmind/radmind-assistant/rsm In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv15208 Modified Files: RSMPreferences.m Log Message: Using ObjC calls to locate resources. Index: RSMPreferences.m =================================================================== RCS file: /cvsroot/radmind/radmind-assistant/rsm/RSMPreferences.m,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** RSMPreferences.m 3 Jun 2007 03:24:31 -0000 1.16 --- RSMPreferences.m 24 Jun 2008 20:18:40 -0000 1.17 *************** *** 756,759 **** --- 756,760 ---- { NSArray *args = nil; + NSString *authToolPath; pid_t pid; fd_set readmask; *************** *** 761,765 **** int status; int wfd[ 2 ], efd[ 2 ]; - char authtool[ MAXPATHLEN ] = { 0 }; char **execargs = NULL, buf[ MAXPATHLEN ]; AuthorizationRef authRef; --- 762,765 ---- *************** *** 797,807 **** } ! if ( pathfortool( "rsmauthtool", authtool ) != 0 ) { ! [ self preferencesError: @"Failed to locate authorized tool." ]; ! return; } ! args = [ NSArray arrayWithObject: ! [ NSString stringWithUTF8String: authtool ]]; args = [ args arrayByAddingObjectsFromArray: authorizedTaskParameters ]; --- 797,808 ---- } ! if (( authToolPath = [[ NSBundle mainBundle ] ! pathForResource: @"rsmauthtool" ! ofType: nil ] ) == nil ) { ! NSLog( @"rsmauthtool couldn't be found." ); ! return; } ! args = [ NSArray arrayWithObject: authToolPath ]; args = [ args arrayByAddingObjectsFromArray: authorizedTaskParameters ]; |