+ if( !len ) return 1;
+ char *pats = new char[len+1], *bp = pats;
+ for( int i=0; i<n; ++i ) {
+ idxbl = drag_idxbls->get(i);
+ if( !idxbl->is_asset &&
+ idxbl->folder_no == AW_PROXY_FOLDER )
+ continue;
+ if( i > 0 ) *bp++ = '\n';
+ const char *tp = idxbl->get_title();
+ if( use_basename && idxbl->is_asset ) {
+ const char *cp = strrchr(tp, '/');
+ if( cp ) tp = cp + 1;
+ *bp++ = '*';
+ }
+ while( *tp ) *bp++ = *tp++;
+ }
+ *bp = 0;
+// new pattern filter
+ BinFolderFilter *filter = new BinFolderFilter();
+ filter->update_enabled(FOLDER_ENABLED_OR);
+ filter->update_target(FOLDER_TARGET_PATTERNS);
+ filter->update_op(FOLDER_OP_MATCHES);
+ BinFolderTargetPatterns *patterns = (BinFolderTargetPatterns *)(filter->target);
+ patterns->update(pats);
+ filters.append(filter);
+ return 0;