Commit f3d04cae authored by John van Groningen's avatar John van Groningen
Browse files

fix exec path on the mac for project files in which the

exec path is not specified, by testing whether the
string is empty before calling SetProject, because
SetProject replaces the empty string by the
project path
parent de0e176e
...@@ -836,18 +836,19 @@ ReadProjectFile projectPath applicationDir ps ...@@ -836,18 +836,19 @@ ReadProjectFile projectPath applicationDir ps
= ((emptyProject,False,"The file \"" +++ projectName +++ "\" is an old project and could not be opened."),ps) = ((emptyProject,False,"The file \"" +++ projectName +++ "\" is an old project and could not be opened."),ps)
#! (options, file) = ReadOptionsFile file #! (options, file) = ReadOptionsFile file
projectGO = GetProject applicationDir projectDir emptyProject projectGO = GetProject applicationDir projectDir emptyProject
project = GetOptions ProjectTable options projectGO projectGO = GetOptions ProjectTable options projectGO
project = (if (version == "1.3") projectGO = (if (version == "1.3")
(\p->{p&pg_target="StdEnv"}) (\p->{p&pg_target="StdEnv"})
(id) (id)
) project // DvA: need to set needs save flag for project; ) projectGO // DvA: need to set needs save flag for project;
/* /*
It's better to replace above with a dialog with popup of available environments. It's better to replace above with a dialog with popup of available environments.
*/ */
project = SetProject applicationDir projectDir project unexpanded_exec_path = projectGO.pg_execpath
project = SetProject applicationDir projectDir projectGO
execpath = PR_GetExecPath project execpath = PR_GetExecPath project
(rootpath,project) = PR_GetRootPathName project (rootpath,project) = PR_GetRootPathName project
project = PR_SetExecPath (if (execpath=="") (MakeExecPathname rootpath) execpath) project project = PR_SetExecPath (if (size unexpanded_exec_path==0) (MakeExecPathname rootpath) execpath) project
(closed, ps) = fclose file ps (closed, ps) = fclose file ps
| not closed | not closed
// generate warning? // generate warning?
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment