Fix T42499: Make sure directories are not interpreted as libraries

This commit is contained in:
julianeisel 2014-11-10 18:51:56 +01:00
parent 157067acbd
commit 4eb628e204
Notes: blender-bot 2023-02-14 09:51:50 +01:00
Referenced by issue #42499, Directories containing file extensions can't rename items
1 changed files with 3 additions and 0 deletions

View File

@ -1155,6 +1155,9 @@ bool BLO_is_a_library(const char *path, char *dir, char *group)
int len;
char *fd;
/* if path leads to a directory we can be sure we're not in a library */
if (BLI_is_dir(path)) return 0;
strcpy(dir, path);
len = strlen(dir);
if (len < 7) return 0;