Skip to content

Commit

Permalink
ide/Project: Only making CF_DIR relative when inside project dir & on…
Browse files Browse the repository at this point in the history
…ly using CF_DIR env. var. when absolute
  • Loading branch information
jerstlouis committed Sep 3, 2012
1 parent ae70201 commit 997cab8
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions ide/src/project/Project.ec
Original file line number Diff line number Diff line change
Expand Up @@ -1209,8 +1209,8 @@ private:
// Using a relative path makes it less likely to run into spaces issues
// Even with escaped spaces, there still seems to be issues including a config file
// in a path containing spaces

MakePathRelative(temp, topNode.path, cfDir);
if(IsPathInsideOf(cfDir, topNode.path))
MakePathRelative(temp, topNode.path, cfDir);
}
if(cfDir && cfDir[0] && cfDir[strlen(cfDir)-1] != '/')
strcat(cfDir, "/");
Expand Down Expand Up @@ -2135,7 +2135,12 @@ private:
strcat(cfDir, "/");
}
else
strcpy(cfDir, "$(CF_DIR)");
{
GetIDECompilerConfigsDir(cfDir, true, true);
// Use CF_DIR environment variable for absolute paths only
if(cfDir[0] == '/' || (cfDir[0] && cfDir[1] == ':'))
strcpy(cfDir, "$(CF_DIR)");
}

f.Printf("_CF_DIR = %s\n", cfDir);
f.Printf("\n");
Expand Down

0 comments on commit 997cab8

Please sign in to comment.