Ignore:
Timestamp:
Jan 10, 2006, 9:35:09 AM (15 years ago)
Author:
bcornec
Message:

Abort when one of the include dirs (-I) does not exist (bug reported by jeff@…)
A warning is also logged for the -E option

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.06/mondo/mondo/mondoarchive/mondo-cli.c

    r273 r289  
    360360    long itbs;
    361361
     362    struct stat buf;
     363
    362364    malloc_string(tmp);
    363365    malloc_string(psz);
     
    439441        if (bkpinfo->include_paths[0]) {
    440442            strcat(bkpinfo->include_paths, " ");
     443        }
     444        if (stat(flag_val['I'], &buf) != 0) {
     445            log_msg("ERROR ! %s doesn't exist", flag_val['I']);
     446            fatal_error("ERROR ! You specified a directory to include which doesn't exist");
    441447        }
    442448        strncpy(bkpinfo->include_paths + strlen(bkpinfo->include_paths),
     
    652658        if (bkpinfo->exclude_paths[0]) {
    653659            strcat(bkpinfo->exclude_paths, " ");
     660        }
     661        if (stat(flag_val['E'], &buf) != 0) {
     662            log_msg(1, "WARNING ! %s doesn't exist", flag_val['E']);
    654663        }
    655664        strncpy(bkpinfo->exclude_paths + strlen(bkpinfo->exclude_paths),
Note: See TracChangeset for help on using the changeset viewer.