fix [#26591] File browser: select multiple files for Library append/link broken

* added check for valid files a bit too eagerly in Rev.35654. Solved now by
  setting correct type for .blend file contents. Objects are now tagged as
  regular files, while the list (Mesh, Material, ...) (no idcode given) is
  tagged as directory.
This commit is contained in:
Andrea Weikert
2011-03-23 18:51:31 +00:00
parent 7cef4ea008
commit 26dd18e7ce

View File

@@ -1057,8 +1057,11 @@ void filelist_from_library(struct FileList* filelist)
char *blockname= l->link;
filelist->filelist[i + 1].relname= BLI_strdup(blockname);
if (!idcode)
if (idcode) {
filelist->filelist[i + 1].type |= S_IFREG;
} else {
filelist->filelist[i + 1].type |= S_IFDIR;
}
}
if(previews) {
@@ -1194,7 +1197,7 @@ void filelist_from_main(struct FileList *filelist)
files->relname= MEM_mallocN(FILE_MAXDIR+FILE_MAXFILE+32, "filename for lib");
sprintf(files->relname, "%s | %s", id->lib->name, id->name+2);
}
/* files->type |= S_IFDIR; */
files->type |= S_IFREG;
#if 0 // XXXXX TODO show the selection status of the objects
if(!filelist->has_func) { /* F4 DATA BROWSE */
if(idcode==ID_OB) {