Changeset 3503


Ignore:
Timestamp:
Feb 9, 2016, 2:58:50 PM (22 months ago)
Author:
bruno
Message:

Log when creating temp or scratch directories

File:
1 edited

Legend:

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

    r3502 r3503  
    699699    /* Always take in account arg first, then env, then default */
    700700    if (path != NULL) {
     701        mr_system("mkdir -p %s",path);
     702        log_it("Created temporary directory %s", path);
    701703        mr_asprintf(tmp, "%s/mondo.tmp.XXXXXX", path);
    702704    } else if (getenv("TMPDIR")) {
    703705        mr_system("mkdir -p %s",getenv("TMPDIR"));
     706        log_it("Created temporary directory %s", getenv("TMPDIR"));
    704707        mr_asprintf(tmp, "%s/mondo.tmp.XXXXXX", getenv("TMPDIR"));
    705708    } else if (getenv("MRTMP")) {
    706709        mr_system("mkdir -p %s",getenv("MRTMP"));
     710        log_it("Created temporary directory %s", getenv("MRTMP"));
    707711        mr_asprintf(tmp, "%s/mondo.tmp.XXXXXX", getenv("MRTMP"));
    708712    } else {
     
    749753    if (path != NULL) {
    750754        mr_system("mkdir -p %s",path);
     755        log_it("Created scratch directory %s", path);
    751756        mr_asprintf(tmp, "%s/mondo.scratch.XXXXXX", path);
    752757    } else if (getenv("MRSCRATCH")) {
    753758        mr_system("mkdir -p %s",getenv("MRSCRATCH"));
     759        log_it("Created scratch directory %s", getenv("MRSCRATCH"));
    754760        mr_asprintf(tmp, "%s/mondo.scratch.XXXXXX", getenv("MRSCRATCH"));
    755761    } else {
Note: See TracChangeset for help on using the changeset viewer.