-// prepare filter
- const char *filter1 = ".idx";
- const char *filter2 = ".toc";
- const char *filter3 = ".mkr";
-
-// pwindow->disable_window();
- sprintf(string, _("Delete all indexes in %s?"), string1);
-// QuestionWindow confirm(mwindow);
-// confirm.create_objects(string, 0);
-
-// int result = confirm.run_window();
-
- int result = 0;
- if(!result)
- {
- for(int i = 0; i < dir.dir_list.total; i++)
- {
- result = 1;
- sprintf(string2, "%s%s", string1, dir.dir_list.values[i]->name);
-// test filter
- if(test_filter(string2, filter1) ||
- test_filter(string2, filter2) ||
- test_filter(string2, filter3))
- {
- remove(string2);
+
+ for( int i=0; i<dir.dir_list.total; ++i ) {
+ const char *fn = dir.dir_list.values[i]->name;
+ if( FileSystem::test_filter(fn, filter) ) continue;
+ sprintf(string2, "%s%s", string1, dir.dir_list.values[i]->name);
+ remove(string2);