From fbcdb748cd0a766bc4e89ef8aa2f1f6eb8eaf3de Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 12 Apr 2025 02:23:49 +0000 Subject: [PATCH] WM: remove arbitrary path length limit for FS_CATEGORY_OTHER Paths were checked for being at least 3 characters in length before being added to FS_CATEGORY_OTHER. It looks like this was originally done to prevent the preferences attempting to add "//" paths which is now handled by `BLI_path_is_rel`. As it happens the old logic prior to [0] was incorrect and asserted if textures was set to "//textures" for example. Now only check the path isn't empty. [0]: 968f156fae48a5d8565debbb5626407a53268274 --- source/blender/editors/space_file/fsmenu_system.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/editors/space_file/fsmenu_system.cc b/source/blender/editors/space_file/fsmenu_system.cc index f11cffbab70..aef542f6404 100644 --- a/source/blender/editors/space_file/fsmenu_system.cc +++ b/source/blender/editors/space_file/fsmenu_system.cc @@ -681,7 +681,7 @@ void fsmenu_read_system(FSMenu *fsmenu, int read_bookmarks) * NOTE: of the preferences support as `//` prefix. * Skip them since they depend on the current loaded blend file. */ #define FS_UDIR_PATH(dir, icon) \ - if ((BLI_strnlen(dir, 3) > 2) && !BLI_path_is_rel(dir)) { \ + if (dir[0] && !BLI_path_is_rel(dir)) { \ fsmenu_insert_entry(fsmenu, FS_CATEGORY_OTHER, dir, nullptr, icon, FS_INSERT_LAST); \ }