If filename is not absolute, normalize it (happens when invoking with the filename as argument to the application, e.g. 'ProjectCenter myProject').

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@37130 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Riccardo Mottola 2013-09-21 18:01:04 +00:00
parent 54c00a562f
commit b010cead23
2 changed files with 10 additions and 1 deletions

View file

@ -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 <rm@gnu.org>
* Framework/PCFileCreator.m

View file

@ -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)
{