Ignore:
Timestamp:
Jan 25, 2011, 10:44:33 AM (13 years ago)
Author:
Bruno Cornec
Message:
  • Backport from 2.2.10 the support of a dynamic exclude_path variable. Should help fix #366, #421, #368, #443. To be tested.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.9/mondo/src/common/libmondo-cli.c

    r2694 r2697  
    612612            log_to_screen("Please supply a sensible value with '-E'\n");
    613613        }
    614         if (bkpinfo->exclude_paths[0]) {
    615             strcat(bkpinfo->exclude_paths, " ");
    616         }
     614        mr_strcat(bkpinfo->exclude_paths, " ");
    617615        mr_asprintf(&tmp1, "%s", flag_val['E']);
    618616
     
    658656    {
    659657        mr_asprintf(&psz, "%s", list_of_NETFS_mounts_only());
    660         if (bkpinfo->exclude_paths[0]) {
    661             strncat(bkpinfo->exclude_paths, " ", 4*MAX_STR_LEN);
    662         }
    663         strncat(bkpinfo->exclude_paths, psz, 4*MAX_STR_LEN);
     658        mr_strcat(bkpinfo->exclude_paths, "%s ", psz);
    664659        mr_free(psz);
    665660
    666         log_msg(3, "-N means we're now excluding %s",
    667                 bkpinfo->exclude_paths);
    668     }
    669 
    670     if (strlen(bkpinfo->exclude_paths) >= 4*MAX_STR_LEN) {
    671         fatal_error
    672             ("Your '-E' parameter is too long. Increase MAX_STR_LEN");
     661        if (bkpinfo->exclude_paths != NULL) {
     662            log_msg(3, "-N means we're now excluding %s", bkpinfo->exclude_paths);
     663        }
    673664    }
    674665
Note: See TracChangeset for help on using the changeset viewer.