mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-22 16:33:29 +00:00
drop .exe extension for process name on windows
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@24832 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
642dd459bd
commit
72ed701246
3 changed files with 20 additions and 8 deletions
|
@ -1,3 +1,10 @@
|
|||
2007-03-09 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/NSProcessInfo.m: On mswindows, don't count a '.exe'
|
||||
extension as part of the process name.
|
||||
* Source/NSUserDefaults.m: Revert last change ... now done in
|
||||
NSProcessInfo.m
|
||||
|
||||
2007-03-08 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* Source/Addictions/GSXML.m: Cope with cancellation of load from URL
|
||||
|
|
|
@ -275,6 +275,19 @@ _gnu_process_args(int argc, char *argv[], char *env[])
|
|||
/* Getting the process name */
|
||||
IF_NO_GC(RELEASE(_gnu_processName));
|
||||
_gnu_processName = [arg0 lastPathComponent];
|
||||
#if defined(__MINGW32__)
|
||||
/* On windows we remove any .exe extension for consistency with app names
|
||||
* under unix
|
||||
*/
|
||||
{
|
||||
NSString *e = [_gnu_processName pathExtension];
|
||||
|
||||
if (e != nil && [e caseInsensitiveCompare: @"EXE"] == NSOrderedSame)
|
||||
{
|
||||
_gnu_processName = [_gnu_processName stringByDeletingPathExtension];
|
||||
}
|
||||
}
|
||||
#endif
|
||||
IF_NO_GC(RETAIN(_gnu_processName));
|
||||
|
||||
/* Copy the argument list */
|
||||
|
|
|
@ -714,14 +714,6 @@ static BOOL setSharedDefaults = NO; /* Flag to prevent infinite recursion */
|
|||
{
|
||||
NSString *s = [[NSProcessInfo processInfo] processName];
|
||||
|
||||
#if defined(__MINGW32__)
|
||||
NSString *e = [s pathExtension];
|
||||
|
||||
if (e != nil && [e caseInsensitiveCompare: @"EXE"] == NSOrderedSame)
|
||||
{
|
||||
s = [s stringByDeletingPathExtension];
|
||||
}
|
||||
#endif
|
||||
processName = [s copy];
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue