Merged changes in the trunk up to revision 42116.
[blender.git] / source / blender / editors / space_file / filelist.c
index deed7ad2a3a859911f23bd25a41276e007af71fa..4682ea3fb6024902ae680bf7ded7b45dc8f4bbcc 100644 (file)
@@ -852,7 +852,7 @@ static void filelist_read_library(struct FileList* filelist)
                file = filelist->filelist;
                for(num=0; num<filelist->numfiles; num++, file++) {
                        if(BLO_has_bfile_extension(file->relname)) {
-                               char name[FILE_MAXDIR+FILE_MAXFILE];
+                               char name[FILE_MAX];
                        
                                BLI_strncpy(name, filelist->dir, sizeof(name));
                                strcat(name, file->relname);
@@ -988,7 +988,7 @@ void filelist_from_library(struct FileList* filelist)
        LinkNode *l, *names, *previews;
        struct ImBuf* ima;
        int ok, i, nprevs, nnames, idcode;
-       char filename[FILE_MAXDIR+FILE_MAXFILE];
+       char filename[FILE_MAX];
        char dir[FILE_MAX], group[GROUP_MAX];   
        
        /* name test */
@@ -1103,7 +1103,7 @@ void filelist_from_main(struct FileList *filelist)
        if( filelist->dir[0]==0) {
                
                /* make directories */
-               filelist->numfiles= 24;
+               filelist->numfiles= 25;
                filelist->filelist= (struct direntry *)malloc(filelist->numfiles * sizeof(struct direntry));
                
                for(a=0; a<filelist->numfiles; a++) {
@@ -1134,6 +1134,7 @@ void filelist_from_main(struct FileList *filelist)
                filelist->filelist[21].relname= BLI_strdup("Action");
                filelist->filelist[22].relname= BLI_strdup("NodeTree");
                filelist->filelist[23].relname= BLI_strdup("Speaker");
+               filelist->filelist[24].relname= BLI_strdup("FreestyleLineStyle");
                filelist_sort(filelist, FILE_SORT_ALPHA);
        }
        else {
@@ -1179,7 +1180,7 @@ void filelist_from_main(struct FileList *filelist)
                                        if(id->lib==NULL)
                                                files->relname= BLI_strdup(id->name+2);
                                        else {
-                                               files->relname= MEM_mallocN(FILE_MAXDIR+FILE_MAXFILE+32, "filename for lib");
+                                               files->relname= MEM_mallocN(FILE_MAX+32, "filename for lib");
                                                sprintf(files->relname, "%s | %s", id->lib->name, id->name+2);
                                        }
                                        files->type |= S_IFREG;