This Trac instance is not used for development anymore!

We migrated our development workflow to git and Gitea.
To test the future redirection, replace trac by ariadne in the page URL.

Changeset 362 for ps


Ignore:
Timestamp:
06/02/04 18:58:35 (21 years ago)
Author:
janwas
Message:

CVS dirs are skipped when mounting

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ps/trunk/source/lib/res/vfs.cpp

    r358 r362  
    454454    // directory
    455455    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
    456463        err = cur_dir->add_subdir(fn);
     464    }
    457465    // file
    458466    else
     
    857865        }
    858866        else
    859             goto invalid_filter;
     867        {
     868        invalid_filter:
     869            debug_warn("vfs_next_dirent: invalid filter");
     870            return -1;
     871        }
    860872    }
    861873
     
    881893
    882894        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        }
    885909    }
    886910
     
    888912    ent->name = fn;
    889913    return 0;
    890 
    891 invalid_filter:
    892     debug_warn("vfs_next_dirent: invalid filter");
    893     return -1;
    894914}
    895915
Note: See TracChangeset for help on using the changeset viewer.