From 5343d0f49400adf6515efcf5b2792edb532cd01c Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 18 Feb 2020 20:47:43 +1100 Subject: 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. --- source/blender/blenlib/intern/path_util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/blenlib/intern/path_util.c') diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c index f8e703dbb56..e3c455fe417 100644 --- a/source/blender/blenlib/intern/path_util.c +++ b/source/blender/blenlib/intern/path_util.c @@ -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; } } -- cgit v1.2.3