diff options
author | Andrea Weikert <elubie@gmx.net> | 2010-03-20 17:23:56 +0300 |
---|---|---|
committer | Andrea Weikert <elubie@gmx.net> | 2010-03-20 17:23:56 +0300 |
commit | 08164794b2dad21e2ffaf2fa61d60fa77d86d2c8 (patch) | |
tree | 6e5e9be110877c333c0abd6881840292abed8445 /source/blender/blenlib/intern | |
parent | ca3736c123aff2bb01f3231687a807952cdca4af (diff) |
Fix [#21658] file browser "hide invisible" doesn't hide anything
- moved global hide_dot to filelist.
- hiding dot files is now included in the filtering of files, which means that for this directory also doesn't have to be read anymore.
- reverted changes of rev. 27491 and related changes in rev. 27523 in favor of a more general abstraction for the different 'file browser modes' with respect to filtering.
Diffstat (limited to 'source/blender/blenlib/intern')
-rw-r--r-- | source/blender/blenlib/intern/storage.c | 25 |
1 files changed, 6 insertions, 19 deletions
diff --git a/source/blender/blenlib/intern/storage.c b/source/blender/blenlib/intern/storage.c index f21e5ef5575..139bb551926 100644 --- a/source/blender/blenlib/intern/storage.c +++ b/source/blender/blenlib/intern/storage.c @@ -204,14 +204,6 @@ double BLI_diskfree(char *dir) #endif } -static int hide_dot= 0; - -void BLI_hide_dot_files(int set) -{ - if(set) hide_dot= 1; - else hide_dot= 0; -} - void BLI_builddir(char *dirname, char *relname) { struct dirent *fname; @@ -237,17 +229,12 @@ void BLI_builddir(char *dirname, char *relname) while ((fname = (struct dirent*) readdir(dir)) != NULL) { len= strlen(fname->d_name); - if(hide_dot && fname->d_name[0]=='.' && fname->d_name[1]!='.' && fname->d_name[1]!=0); /* ignore .file */ - else if(hide_dot && len && fname->d_name[len-1]=='~'); /* ignore file~ */ - else if (((fname->d_name[0] == '.') && (fname->d_name[1] == 0) )); /* ignore . */ - else { - dlink = (struct dirlink *)malloc(sizeof(struct dirlink)); - if (dlink){ - strcpy(buf+rellen,fname->d_name); - dlink->name = BLI_strdup(buf); - BLI_addhead(dirbase,dlink); - newnum++; - } + dlink = (struct dirlink *)malloc(sizeof(struct dirlink)); + if (dlink){ + strcpy(buf+rellen,fname->d_name); + dlink->name = BLI_strdup(buf); + BLI_addhead(dirbase,dlink); + newnum++; } } |