Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <campbell@blender.org>2022-08-31 05:42:41 +0300
committerCampbell Barton <campbell@blender.org>2022-08-31 05:42:41 +0300
commit657b92c888f925a6721e30f1d43cb170b7908c12 (patch)
tree6aec8e104d9e79dfbf350911d663c3c1c0754dce
parentdc733cf17de4095e35a879a70b01bcd67c512167 (diff)
BLF: use existing stat from 'direntry' for directory check
-rw-r--r--source/blender/blenfont/intern/blf_font_default.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/blenfont/intern/blf_font_default.c b/source/blender/blenfont/intern/blf_font_default.c
index ffeee397c20..9ab5caf3d33 100644
--- a/source/blender/blenfont/intern/blf_font_default.c
+++ b/source/blender/blenfont/intern/blf_font_default.c
@@ -16,6 +16,10 @@
#include "BKE_appdir.h"
+#ifdef WIN32
+# include "BLI_winstuff.h"
+#endif
+
static int blf_load_font_default(const char *filename, const bool unique)
{
const char *dir = BKE_appdir_folder_id(BLENDER_DATAFILES, BLF_DATAFILES_FONTS_DIR);
@@ -65,7 +69,7 @@ void BLF_load_font_stack()
struct direntry *dir;
uint num_files = BLI_filelist_dir_contents(path, &dir);
for (int f = 0; f < num_files; f++) {
- if (!BLI_is_dir(dir[f].path) &&
+ if (!S_ISDIR(dir[f].s.st_mode) &&
BLI_path_extension_check_n(
dir[f].path, ".ttf", ".ttc", ".otf", ".otc", ".woff", ".woff2", NULL)) {
if (!BLF_is_loaded(dir[f].path)) {