diff --git a/ChangeLog b/ChangeLog index ecca1da..dfc3ccd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,9 @@ * Modules/Parsers/ProjectCenter/PCParser.m Fix parser check for temrination, do not look past last char. + * PCAppController.m + If filename is not absolute, normalize it (happens when invoking with the filename as argument to the application, e.g. 'ProjectCenter myProject'). + 2013-09-20 Riccardo Mottola * Framework/PCFileCreator.m diff --git a/PCAppController.m b/PCAppController.m index bbf8de4..f5ef52a 100644 --- a/PCAppController.m +++ b/PCAppController.m @@ -1,7 +1,7 @@ /* GNUstep ProjectCenter - http://www.gnustep.org/experience/ProjectCenter.html - Copyright (C) 2001-2012 Free Software Foundation + Copyright (C) 2001-2013 Free Software Foundation This file is part of GNUstep. @@ -109,6 +109,12 @@ { [NSApp activateIgnoringOtherApps:YES]; + if (![fileName isAbsolutePath]) + { + NSString *cwd = [[NSFileManager defaultManager] currentDirectoryPath]; + fileName = [cwd stringByAppendingPathComponent: fileName]; + } + if ([[fileName pathExtension] isEqualToString:@"pcproj"] == YES || [[fileName pathExtension] isEqualToString:@"project"] == YES) {