diff --git a/extras/Projucer/Source/Utility/jucer_RelativePath.h b/extras/Projucer/Source/Utility/jucer_RelativePath.h index 5a8f25efc2..00c3ded8c8 100644 --- a/extras/Projucer/Source/Utility/jucer_RelativePath.h +++ b/extras/Projucer/Source/Utility/jucer_RelativePath.h @@ -110,17 +110,17 @@ private: File getFakeFile() const { + #if JUCE_WINDOWS if (FileHelpers::isAbsolutePath (path)) { - #if JUCE_WINDOWS // This is a hack to convert unix-style absolute paths into valid absolute Windows paths to avoid hitting // an assertion in File::parseAbsolutePath(). if (path.startsWithChar (L'/') || path.startsWithChar (L'$') || path.startsWithChar (L'~')) return File (String ("C:\\") + FileHelpers::windowsStylePath (path.substring (1))); - #endif return File (path); } + #endif // This method gets called very often, so we'll cache this directory. static const File currentWorkingDirectory (File::getCurrentWorkingDirectory());