From c25727c64a39ca18ae7683f7f8a45c7366c3ef16 Mon Sep 17 00:00:00 2001 From: ed Date: Fri, 12 May 2017 12:47:26 +0100 Subject: [PATCH] Projucer: Fixed assertion in last commit when not on Windows --- extras/Projucer/Source/Utility/jucer_RelativePath.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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());