Fix making paths relative on windows

Comparing the drive letter was case sensitive,
causing 'BLI_path_rel' to fail in common cases
(manually entering a lower case drive letter for example).

Surprisingly this issue dates back to 2005 and wasn't reported.
This commit is contained in:
2020-02-18 20:47:43 +11:00
parent 8a2228a597
commit 5343d0f494

View File

@@ -576,7 +576,7 @@ void BLI_path_rel(char *file, const char *relfile)
}
}
}
else if (temp[1] == ':' && file[1] == ':' && temp[0] != file[0]) {
else if ((temp[1] == ':' && file[1] == ':') && (tolower(temp[0]) != tolower(file[0]))) {
return;
}
}