1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-27 02:20:05 +00:00

Deprecated File::separator and File::separatorString, replacing them by static getter functions, so that File methods can be safely used in static constructors without order-of-initialisation problems

This commit is contained in:
jules 2017-10-10 11:33:55 +01:00
parent 15871dd890
commit 2ee168ad46
8 changed files with 64 additions and 48 deletions

View file

@ -502,14 +502,14 @@ String Project::getRelativePathForFile (const File& file) const
String p1 (relativePathBase.getFullPathName());
String p2 (file.getFullPathName());
while (p1.startsWithChar (File::separator))
while (p1.startsWithChar (File::getSeparatorChar()))
p1 = p1.substring (1);
while (p2.startsWithChar (File::separator))
while (p2.startsWithChar (File::getSeparatorChar()))
p2 = p2.substring (1);
if (p1.upToFirstOccurrenceOf (File::separatorString, true, false)
.equalsIgnoreCase (p2.upToFirstOccurrenceOf (File::separatorString, true, false)))
if (p1.upToFirstOccurrenceOf (File::getSeparatorString(), true, false)
.equalsIgnoreCase (p2.upToFirstOccurrenceOf (File::getSeparatorString(), true, false)))
{
filename = FileHelpers::getRelativePathFrom (file, relativePathBase);
}