diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-02-18 12:47:43 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-02-18 12:56:23 +0300 |
commit | 5343d0f49400adf6515efcf5b2792edb532cd01c (patch) | |
tree | 3d6703f13569dc557703f1934385e75279ece73e /source/blender/blenlib/intern/path_util.c | |
parent | 8a2228a59785f898059eb0bafc74c5b5897555eb (diff) |
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.
Diffstat (limited to 'source/blender/blenlib/intern/path_util.c')
-rw-r--r-- | source/blender/blenlib/intern/path_util.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; } } |