- Timestamp:
- 06/02/04 18:58:35 (21 years ago)
- File:
-
- 1 edited
-
ps/trunk/source/lib/res/vfs.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
ps/trunk/source/lib/res/vfs.cpp
r358 r362 454 454 // directory 455 455 if(flags & LOC_DIR) 456 { 457 // leave out CVS dirs in debug builds. this makes possible 458 // user code that relies on a fixed data directory structure. 459 #ifndef NDEBUG 460 if(!strcmp(fn, "CVS")) 461 return 0; 462 #endif 456 463 err = cur_dir->add_subdir(fn); 464 } 457 465 // file 458 466 else … … 857 865 } 858 866 else 859 goto invalid_filter; 867 { 868 invalid_filter: 869 debug_warn("vfs_next_dirent: invalid filter"); 870 return -1; 871 } 860 872 } 861 873 … … 881 893 882 894 char* const ext = strrchr(fn, '.'); 883 if(!filter || (filter_no_ext && !ext) || strcmp(ext, filter) == 0) 884 goto have_match; 895 // file has an extension 896 if(ext) 897 { 898 // not filtering, or filter matches extension: match 899 if(!filter || strcmp(ext, filter) == 0) 900 goto have_match; 901 } 902 // file has no extension 903 else 904 { 905 // filter accepts files without an extension: match 906 if(filter_no_ext) 907 goto have_match; 908 } 885 909 } 886 910 … … 888 912 ent->name = fn; 889 913 return 0; 890 891 invalid_filter:892 debug_warn("vfs_next_dirent: invalid filter");893 return -1;894 914 } 895 915
Note:
See TracChangeset
for help on using the changeset viewer.
