mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-31 00:30:53 +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
c6fb5029cf
commit
8bb559b207
3 changed files with 20 additions and 8 deletions
|
@ -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 */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue