1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-17 00:44:19 +00:00

Introjucer: improved handling of windows filenames when run on *nix.

This commit is contained in:
jules 2012-04-16 12:20:58 +01:00
parent 3f953ca21d
commit cebf34d9bb
8 changed files with 50 additions and 32 deletions

View file

@ -306,8 +306,8 @@ File Project::resolveFilename (String filename) const
filename = replacePreprocessorDefs (getPreprocessorDefs(), filename)
.replaceCharacter ('\\', '/');
if (File::isAbsolutePath (filename))
return File (filename);
if (FileHelpers::isAbsolutePath (filename))
return File::createFileWithoutCheckingPath (filename); // (avoid assertions for windows-style paths)
return getFile().getSiblingFile (filename);
}
@ -330,7 +330,7 @@ String Project::getRelativePathForFile (const File& file) const
if (p1.upToFirstOccurrenceOf (File::separatorString, true, false)
.equalsIgnoreCase (p2.upToFirstOccurrenceOf (File::separatorString, true, false)))
{
filename = file.getRelativePathFrom (relativePathBase);
filename = FileHelpers::getRelativePathFrom (file, relativePathBase);
}
return filename;