Ignore:
Timestamp:
Feb 2, 2011, 12:35:51 PM (9 years ago)
Author:
Bruno Cornec
Message:
  • Fix #444. mondoarchive now supports inclusion/exclusion of dirs with spaces in their name. this required a syntax change for the -E/-I options where the list of dirs needs to be separated by '|' now instead of ' '.
File:
1 edited

Legend:

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

    r2698 r2713  
    277277        }
    278278        if (bkpinfo->include_paths[0]) {
    279             strcat(bkpinfo->include_paths, " ");
     279            strcat(bkpinfo->include_paths, "|");
    280280        }
    281281
     
    286286        /* Cut the flag_val['I'] in parts containing all paths to test them */
    287287        while (p != NULL) {
    288             q = strchr(p, ' ');
     288            q = strchr(p, '|');
    289289            if (q != NULL) {
    290290                *q = '\0';
     
    612612            log_to_screen("Please supply a sensible value with '-E'\n");
    613613        }
    614         mr_strcat(bkpinfo->exclude_paths, " ");
    615614        mr_asprintf(&tmp1, "%s", flag_val['E']);
    616615
     
    620619        /* Cut the flag_val['E'] in parts containing all paths to test them */
    621620        while (p != NULL) {
    622             q = strchr(p, ' ');
     621            q = strchr(p, '|');
    623622            if (q != NULL) {
    624623                *q = '\0';
     
    655654    if ((flag_set['N']) && (! bkpinfo->restore_data))       // exclude Network mounts & devices
    656655    {
    657         mr_asprintf(&psz, "%s", list_of_NETFS_mounts_only());
    658         mr_strcat(bkpinfo->exclude_paths, "%s ", psz);
    659         mr_free(psz);
     656        psz = list_of_NETFS_mounts_only();
     657        log_msg(5, "-N means we'll exclude %s", psz);
     658        if (bkpinfo->exclude_paths) {
     659            mr_strcat(bkpinfo->exclude_paths, "|%s", psz);
     660            mr_free(psz);
     661        } else {
     662            bkpinfo->exclude_paths = psz;
     663        }
    660664
    661665        if (bkpinfo->exclude_paths != NULL) {
Note: See TracChangeset for help on using the changeset viewer.