Ignore:
Timestamp:
Sep 17, 2009, 2:23:18 AM (11 years ago)
Author:
Bruno Cornec
Message:
  • At restore time read the netfs protocol in the conf file
  • Use dir for shell related commands and dir1 for C related actions in open_and_list_dir to avoid missing some files with { in names e.g.

(Backports from 2.2.9)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.10/mondo/src/common/libmondo-filelist.c

    r2383 r2404  
    13451345    time_t this_time;
    13461346
     1347    /* dir is needed when we pass it to the shell */
    13471348    dir = mr_stresc(dir1, "`$\\\"(){}'[]&*?|!#~", '\\');
    13481349    p = strrchr(dir, '/');
     
    13821383        mr_free(tmp1);
    13831384
    1384         mr_asprintf(name_of_evalcall_form, "Making catalog of %s", dir);
     1385        mr_asprintf(name_of_evalcall_form, "Making catalog of %s", dir1);
    13851386        open_evalcall_form(name_of_evalcall_form);
    13861387        mr_free(name_of_evalcall_form);
     
    14031404                last_time = this_time;
    14041405                if (!g_text_mode) {
    1405                     mr_asprintf(tmp, "Reading %-68s", dir);
     1406                    mr_asprintf(tmp, "Reading %-68s", dir1);
    14061407                    newtDrawRootText(0, g_noof_rows - 3, tmp);
    14071408                    mr_free(tmp);
     
    14211422        mr_asprintf(skip_these, " %s ", sth);
    14221423    }
    1423     mr_asprintf(new_with_spaces, " %s ", dir);
    1424     if ((dip = opendir(dir)) == NULL) {
    1425         mr_asprintf(tmp,"opendir %s", dir);
     1424    mr_asprintf(new_with_spaces, " %s ", dir1);
     1425    if ((dip = opendir(dir1)) == NULL) {
     1426        mr_asprintf(tmp,"opendir %s", dir1);
    14261427        log_OS_error(tmp);
    14271428        mr_free(tmp);
    14281429    } else if (strstr(skip_these, new_with_spaces)) {
    1429         fprintf(fout, "%s\n", dir); // if excluded dir then print dir ONLY
     1430        fprintf(fout, "%s\n", dir1);    // if excluded dir then print dir ONLY
    14301431    } else {
    1431         fprintf(fout, "%s\n", dir);
     1432        fprintf(fout, "%s\n", dir1);
    14321433        while ((dit = readdir(dip)) != NULL) {
    14331434            i++;
    1434             if (strcmp(dir, "/")) {
    1435                 mr_asprintf(new,"%s/%s",dir,dit->d_name);
     1435            if (strcmp(dir1, "/")) {
     1436                mr_asprintf(new,"%s/%s",dir1,dit->d_name);
    14361437            } else {
    1437                 mr_asprintf(new,"%s%s",dir,dit->d_name);
     1438                mr_asprintf(new,"%s%s",dir1,dit->d_name);
    14381439            }
    14391440            mr_free(new_with_spaces);
Note: See TracChangeset for help on using the changeset viewer.