Ignore:
Timestamp:
Nov 20, 2007, 3:36:00 PM (12 years ago)
Author:
Bruno Cornec
Message:

exclude_paths now a configuration item

File:
1 edited

Legend:

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

    r1770 r1817  
    506506
    507507    if (flag_set['E']) {
    508         if (bkpinfo->exclude_paths[0]) {
    509             strcat(bkpinfo->exclude_paths, " ");
     508        if (bkpinfo->exclude_paths != NULL) {
     509            mr_strcat(bkpinfo->exclude_paths, " ");
    510510        }
    511511        mr_asprintf(&tmp1, flag_val['E']);
     
    538538        }
    539539        mr_free(tmp1);
    540 
    541         strncpy(bkpinfo->exclude_paths + strlen(bkpinfo->exclude_paths),
    542                 flag_val['E'],
    543                 4*MAX_STR_LEN - strlen(bkpinfo->exclude_paths));
     540        mr_strcat(bkpinfo->exclude_paths, flag_val['E']);
    544541    }
    545542    if (flag_set['e']) {
     
    549546    {
    550547        mr_asprintf(&psz, list_of_NFS_mounts_only());
    551         if (bkpinfo->exclude_paths[0]) {
    552             strncat(bkpinfo->exclude_paths, " ", 4*MAX_STR_LEN);
    553         }
    554         strncat(bkpinfo->exclude_paths, psz, 4*MAX_STR_LEN);
     548        if (bkpinfo->exclude_paths != NULL) {
     549            mr_strcat(bkpinfo->exclude_paths, " ");
     550        }
     551        mr_strcat(bkpinfo->exclude_paths, psz);
    555552        mr_free(psz);
    556553        mr_msg(3, "-N means we're now excluding %s",
    557554                bkpinfo->exclude_paths);
    558     }
    559     if (strlen(bkpinfo->exclude_paths) >= 4*MAX_STR_LEN) {
    560         fatal_error
    561             ("Your '-E' parameter is too long. Increase MAX_STR_LEN");
    562555    }
    563556    if (flag_set['b']) {
Note: See TracChangeset for help on using the changeset viewer.