[Bf-blender-cvs] [0360a2920de] master: Fix: Trailing directory separator missing in default font path on windows.
Ray Molenkamp
noreply at git.blender.org
Sat Jun 1 18:51:21 CEST 2019
Commit: 0360a2920dec9028d6532969788bfb0570ebb835
Author: Ray Molenkamp
Date: Sat Jun 1 10:51:19 2019 -0600
Branches: master
https://developer.blender.org/rB0360a2920dec9028d6532969788bfb0570ebb835
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
===================================================================
M source/blender/blenkernel/intern/appdir.c
===================================================================
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);
More information about the Bf-blender-cvs
mailing list