diff options
Diffstat (limited to 'source/blender/editors/space_file/filelist.c')
-rw-r--r-- | source/blender/editors/space_file/filelist.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index 7d7dccdf0e6..4d904ab6551 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -463,10 +463,7 @@ void folderlist_pushdir(ListBase *folderlist, const char *dir) /* create next folder element */ folder = (FolderList *)MEM_mallocN(sizeof(FolderList), "FolderList"); - folder->foldername = (char *)MEM_mallocN(sizeof(char) * (strlen(dir) + 1), "foldername"); - folder->foldername[0] = '\0'; - - BLI_strncpy(folder->foldername, dir, FILE_MAXDIR); + folder->foldername = BLI_strdup(dir); /* add it to the end of the list */ BLI_addtail(folderlist, folder); |