From 059d01d42e049a5d4a42f81c8b860540127efeb6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Thu, 23 Sep 2021 14:41:06 +0200 Subject: Fileops: call `BLI_path_slash_native()` in `BLI_dir_create_recursive()` Make the Windows version of `BLI_dir_create_recursive()` call `BLI_path_slash_native()` before it tries to handle the path. This should make it possible to call it with non-native path separators. This change was provided by our Windows platform maintainer @LazyDodo in P2414, so I assume he agrees with this change. --- source/blender/blenlib/intern/fileops.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source/blender/blenlib') diff --git a/source/blender/blenlib/intern/fileops.c b/source/blender/blenlib/intern/fileops.c index 532a29b8147..88fb67c5502 100644 --- a/source/blender/blenlib/intern/fileops.c +++ b/source/blender/blenlib/intern/fileops.c @@ -570,6 +570,7 @@ bool BLI_dir_create_recursive(const char *dirname) * blah1/blah2 (without slash) */ BLI_strncpy(tmp, dirname, sizeof(tmp)); + BLI_path_slash_native(tmp); BLI_path_slash_rstrip(tmp); /* check special case "c:\foo", don't try create "c:", harmless but prints an error below */ -- cgit v1.2.3