Ignore:
Timestamp:
Sep 14, 2010, 2:20:27 AM (10 years ago)
Author:
Bruno Cornec
Message:
  • Fix a bug on exclusion of path with common content (/home and /path/home e.g.) which was handled correctly only in a certain order (John Pearson <johnp_at_gtagalenco.com.au>)
File:
1 edited

Legend:

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

    r2682 r2683  
    20892089    /* A device special file was not passed in. Process it as a path. */
    20902090    case -1:
    2091         /* we need to add a space after token to be sure our strstr test works correctly */
    2092         mr_asprintf(&tmp1,"%s ",token);
     2091        /* we need to add a space efore and after token to be sure our strstr test works correctly */
     2092        mr_asprintf(&tmp1," %s ",token);
    20932093        if (mode == 'E') {
    20942094            /*  Add the token if not already in the list */
    2095             mr_asprintf(&tmp,"%s ",bkpinfo->exclude_paths);
     2095            mr_asprintf(&tmp," %s ",bkpinfo->exclude_paths);
    20962096            if (strstr(tmp,tmp1) == NULL) {
    2097                 strcat(bkpinfo->exclude_paths, " ");
    20982097                strcat(bkpinfo->exclude_paths, tmp1);
    20992098            }
    21002099        } else {
    21012100            /*  Add the token if not already in the list */
    2102             mr_asprintf(&tmp,"%s ",bkpinfo->include_paths);
     2101            mr_asprintf(&tmp," %s ",bkpinfo->include_paths);
    21032102            if (strstr(tmp,tmp1) == NULL) {
    2104                 strcat(bkpinfo->include_paths, " ");
    21052103                strcat(bkpinfo->include_paths, tmp1);
    21062104            }
Note: See TracChangeset for help on using the changeset viewer.