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]: 968f156fae
This commit is contained in:
@@ -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); \
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user