diff options
author | Ray Molenkamp <github@lazydodo.com> | 2019-06-01 19:51:19 +0300 |
---|---|---|
committer | Ray Molenkamp <github@lazydodo.com> | 2019-06-01 19:51:19 +0300 |
commit | 0360a2920dec9028d6532969788bfb0570ebb835 (patch) | |
tree | d7dd8b34fff0f48795d247c8a460c984ffe32b85 /source/blender/blenkernel/intern/appdir.c | |
parent | cc600de6695a241dd9b0de275656b5a7459552dc (diff) |
Fix: Trailing directory separator missing in default font path on windows.
This caused the file browser to open in c:\windows with the fonts
folder selected instead of opening c:\windows\fonts\ and listing
the fonts.
Reported on chat by @blendify
Diffstat (limited to 'source/blender/blenkernel/intern/appdir.c')
-rw-r--r-- | source/blender/blenkernel/intern/appdir.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/appdir.c b/source/blender/blenkernel/intern/appdir.c index 14a20689db0..3b64a9520ca 100644 --- a/source/blender/blenkernel/intern/appdir.c +++ b/source/blender/blenkernel/intern/appdir.c @@ -1033,7 +1033,10 @@ bool BKE_appdir_font_folder_default(char *dir) #ifdef WIN32 wchar_t wpath[FILE_MAXDIR]; success = SHGetSpecialFolderPathW(0, wpath, CSIDL_FONTS, 0); - BLI_strncpy_wchar_as_utf8(dir, wpath, FILE_MAXDIR); + if (success) { + wcscat(wpath, L"\\"); + BLI_strncpy_wchar_as_utf8(dir, wpath, FILE_MAXDIR); + } #endif /* TODO: Values for other platforms. */ UNUSED_VARS(dir); |