diff --git a/ChangeLog b/ChangeLog index 7131fa11f..ff04d935e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-03-06 Richard Frith-Macdonald + + * Source/NSUserDefaults.m: On mswindows, don't count a '.exe' + extension as part of the process name when fetching defaults. + 2007-03-05 Nicola Pero * configure.ac: Fixed setting default GNUSTEP_*_ADMIN_APPS and diff --git a/Source/NSUserDefaults.m b/Source/NSUserDefaults.m index 309202707..b35815067 100644 --- a/Source/NSUserDefaults.m +++ b/Source/NSUserDefaults.m @@ -712,7 +712,17 @@ static BOOL setSharedDefaults = NO; /* Flag to prevent infinite recursion */ */ if (processName == nil) { - processName = RETAIN([[NSProcessInfo processInfo] processName]); + 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]; } if (path == nil || [path isEqual: @""] == YES)