diff --git a/ChangeLog b/ChangeLog
index 5b881d82f..f366f2457 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2005-11-20 Richard Frith-Macdonald
If appName is nil or cannot be launched, this attempts to locate any + * application in a standard location whose name matches port and launch + * that application. + *
*The value of expire provides a timeout in case the application cannot * be contacted promptly. If it is omitted, a thirty second timeout is * used. @@ -1456,9 +1460,14 @@ GSContactApplication(NSString *appName, NSString *port, NSDate *expire) } if (app == nil) { - if ([[NSWorkspace sharedWorkspace] launchApplication: appName] == NO) + if (appName == nil + || [[NSWorkspace sharedWorkspace] launchApplication: appName] == NO) { - return nil; /* Unable to launch. */ + if (port == nil + || [[NSWorkspace sharedWorkspace] launchApplication: port] == NO) + { + return nil; /* Unable to launch. */ + } } NS_DURING diff --git a/Source/NSWorkspace.m b/Source/NSWorkspace.m index 3ff0e98a7..c2e638468 100644 --- a/Source/NSWorkspace.m +++ b/Source/NSWorkspace.m @@ -1301,8 +1301,8 @@ inFileViewerRootedAtPath: (NSString*)rootFullpath { end++; } - len = (end - ptr) * sizeof(unichar); - path = [mgr stringWithFileSystemRepresentation: (char*)ptr length: len]; + len = (end - ptr); + path = [mgr stringWithFileSystemRepresentation: ptr length: len]; [names addObject: path]; } if (base != buf)