Ignore:
Timestamp:
Sep 24, 2007, 2:13:24 PM (13 years ago)
Author:
Bruno Cornec
Message:

mkdtemp checked in configure
Fix bugs insetup_tmpdir

File:
1 edited

Legend:

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

    r1653 r1654  
    966966   
    967967    char *tmp = NULL;
     968    char *p = NULL;
    968969
    969970    if (getenv("TMPDIR")) {
     
    974975        asprintf(&tmp, "/tmp/mondo.tmp.XXXXXX");
    975976    }
    976     if ((bkpinfo->tmpdir = mkdtemp(bkpinfo->tmpdir)) == NULL) {
    977         log_it("Failed to create global tmp directory %s for Mondo.",bkpinfo->tmpdir);
     977    p = mkdtemp(tmp);
     978    if (p == NULL) {
     979        log_it("Failed to create global tmp directory %s for Mondo.",tmp);
    978980        finish(-1);
    979981    }
     982    strcpy(bkpinfo->tmpdir,p);
     983    paranoid_free(tmp);
    980984    //sprintf(bkpinfo->tmpdir, "%s/tmpfs/mondo.tmp.%d", "/tmp", (int) (random() % 32768));  // for mondorestore
    981985}
Note: See TracChangeset for help on using the changeset viewer.