From 194e62f47a0b59d5d0dc3e4f3141252998e1dec3 Mon Sep 17 00:00:00 2001 From: Gregory John Casamento Date: Mon, 18 May 2009 21:27:56 +0000 Subject: [PATCH] * Framework/PCProject.m: Add new project directory name. * Framework/PCProjectManager.m: Fix issue reported with loading of subprojects from an aggregate project. Changed loadProjectAt: method to handle both the current and old file locations. git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/apps/projectcenter/trunk@28288 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 7 +++++++ Framework/PCProject.m | 4 +++- Framework/PCProjectManager.m | 8 +++++++- 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index b9a18b4..e6cea9e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2009-05-18 17:27-EDT Gregory John Casamento + + * Framework/PCProject.m: Add new project directory name. + * Framework/PCProjectManager.m: Fix issue reported with loading of + subprojects from an aggregate project. Changed loadProjectAt: method + to handle both the current and old file locations. + 2009-04-27 17:09-EDT Gregory John Casamento * Framework/PCProjectManager.m: Remove logic requiring projectWindow diff --git a/Framework/PCProject.m b/Framework/PCProject.m index da745f3..5fc730b 100644 --- a/Framework/PCProject.m +++ b/Framework/PCProject.m @@ -1551,9 +1551,11 @@ NSString // Subproject not found in array, load it if (sp == nil) { + NSString *pname = [NSString stringWithFormat: @"%@.pcproj",name]; spFile = [projectPath stringByAppendingPathComponent:name]; spFile = [spFile stringByAppendingPathExtension:@"subproj"]; - spFile = [spFile stringByAppendingPathComponent:@"PC.project"]; + spFile = [spFile stringByAppendingPathComponent: pname]; + spFile = [spFile stringByAppendingPathComponent: @"PC.project"]; /* PCLogInfo(self, @"Not found! Load subproject: %@ at path: %@", name, spFile);*/ sp = [projectManager loadProjectAt:spFile]; diff --git a/Framework/PCProjectManager.m b/Framework/PCProjectManager.m index f336e26..32f3ed1 100644 --- a/Framework/PCProjectManager.m +++ b/Framework/PCProjectManager.m @@ -546,7 +546,13 @@ NSString *PCActiveProjectDidChangeNotification = @"PCActiveProjectDidChange"; NSString *projectClassName = nil; PCProject *project = nil; - projectFile = [NSMutableDictionary dictionaryWithContentsOfFile:aPath]; + projectFile = [NSMutableDictionary dictionaryWithContentsOfFile: aPath]; + if(projectFile == nil) + { + NSString *altPath = [[[aPath stringByDeletingLastPathComponent] stringByDeletingLastPathComponent] + stringByAppendingPathComponent: @"PC.project"]; + projectFile = [NSMutableDictionary dictionaryWithContentsOfFile:altPath]; + } // For compatibility with 0.3.x projects project = [self convertLegacyProject:projectFile atPath:aPath];