Now, if your app is multiplatform (Projucer for example) and you happen to have Mac paths defined in it while you debug on Windows, juce_File.cpp asserts all the time…
The code checks if the machine runs on Windows or Mac and wrongly assumes that all paths should match the OS format of the compiler.
See in juce_File.cpp
String File::parseAbsolutePath (const String& p) { if (p.isEmpty()) return String();
#if JUCE_WINDOWS // Windows.. String path (removeEllipsis (p.replaceCharacter ('/', '\\')));
if (path.startsWithChar (separator)) { if (path[1] != separator) { /* When you supply a raw string to the File object constructor, it must be an absolute path. If you're trying to parse a string that may be either a relative path or an absolute path, you MUST provide a context against which the partial path can be evaluated - you can do this by simply using File::getChildFile() instead of the File constructor. E.g. saying "File::getCurrentWorkingDirectory().getChildFile (myUnknownPath)" would return an absolute path if that's what was supplied, or would evaluate a partial path relative to the CWD. */ jassertfalse;
Would it be possible to remove this jassertfalse or add a flag to remove it when appropriate?
Thanks