Headless: Fix flash0/font path.

This was causing some automated tests to fail incorrectly, after the
assets/flash0/ change.
This commit is contained in:
Unknown W. Brackets 2020-05-23 10:40:32 -07:00
parent 0ff922c3e0
commit 86c0418f14

View File

@ -405,9 +405,10 @@ int main(int argc, const char* argv[])
#endif
// Try to find the flash0 directory. Often this is from a subdirectory.
for (int i = 0; i < 3; ++i)
{
if (!File::Exists(g_Config.flash0Directory))
for (int i = 0; i < 4 && !File::Exists(g_Config.flash0Directory); ++i) {
if (File::Exists(g_Config.flash0Directory + "../assets/flash0/"))
g_Config.flash0Directory += "../assets/flash0/";
else
g_Config.flash0Directory += "../../flash0/";
}
// Or else, maybe in the executable's dir.