Changeset 1657


Ignore:
Timestamp:
Sep 25, 2007, 1:48:10 AM (12 years ago)
Author:
bruno
Message:

First take as tmpdir the parameter passed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.2.5/mondo/src/common/libmondo-tools.c

    r1656 r1657  
    969969        /* purging a potential old tmpdir */
    970970        asprintf(&tmp,"rm -Rf %s",bkpinfo->tmpdir);
    971         run_program_and_log_output(tmp, FALSE);
     971        system(tmp);
    972972        paranoid_free(tmp);
    973973    }
    974974       
    975     if (getenv("TMPDIR")) {
     975    if (path != NULL) {
     976        asprintf(&tmp, "%s/mondo.tmp.XXXXXX", path);
     977    } else if (getenv("TMPDIR")) {
    976978        asprintf(&tmp, "%s/mondo.tmp.XXXXXX", getenv("TMPDIR"));
    977979    } else if (getenv("TMP")) {
    978980        asprintf(&tmp, "%s/mondo.tmp.XXXXXX", getenv("TMP"));
    979     } else if (path != NULL) {
    980         asprintf(&tmp, "%s/mondo.tmp.XXXXXX", path);
    981981    } else {
    982982        asprintf(&tmp, "/tmp/mondo.tmp.XXXXXX");
Note: See TracChangeset for help on using the changeset viewer.