Changeset 31694 for main

Show
Ignore:
Timestamp:
22.05.2017 13:50:40 (3 years ago)
Author:
kjdon
Message:

testing on commdev I had the situation where the apache user couldn't write to gsdlhome, so it needed to use the tmp folder. But there is no TMP environment variable set (which I think was added for windows). so now try /tmp folder if all else fails

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/util.pm

    r31518 r31694  
    262262            &FileUtils::removeFiles($tmp_test_file); 
    263263        } else { # location not writable, use TMP location 
    264             $tmp_dirname = &FileUtils::filenameConcatenate($ENV{'TMP'}, "greenstone"); 
     264        if (defined $ENV{'TMP'}) { 
     265            $tmp_dirname = $ENV{'TMP'}; 
     266        } else { 
     267            $tmp_dirname = "/tmp"; 
     268        } 
     269        $tmp_dirname = &FileUtils::filenameConcatenate($tmp_dirname, "greenstone"); 
    265270            $ENV{'GS_TMP_OUTPUT_DIR'} = $tmp_dirname; # store for next time 
    266271        }