Ignore:
Timestamp:
Jul 10, 2008, 6:37:04 PM (16 years ago)
Author:
Bruno Cornec
Message:
  • Protect recursive remove of tempdir with test on the look and feel of that dir to avoid removing blindly useful dir :-(
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.7/mondo/src/common/newt-specific.c

    r1919 r1999  
    406406        printf("Execution run ended; result=%d\n", signal);
    407407        printf("Type 'less %s' to see the output log\n", MONDO_LOGFILE);
    408         asprintf(&command, "rm -Rf %s %s", bkpinfo->tmpdir, bkpinfo->scratchdir);
    409         system(command);
    410         paranoid_free(command);
     408        if (strstr(bkpinfo->tmpdir ,"mondo.tmp.") != NULL) {
     409            asprintf(&command, "rm -Rf %s %s", bkpinfo->tmpdir, bkpinfo->scratchdir);
     410            system(command);
     411            paranoid_free(command);
     412        }
    411413        paranoid_free(bkpinfo);
    412414        free_libmondo_global_strings();
Note: See TracChangeset for help on using the changeset viewer.