|
|
|
Ok, two big issues with this fix...
1) If I changed the temp directory and save, the files are still being put in the old directory (for some reason the cache? doesn't get updated) 2) We cannot delete *all* files in the temporary directory, only the ones that are created by LAMS. This can be *really* dangerous otherwise. For instance, I changed the temp dir to be /tmp but when I restarted LAMS *all* files within this directory where wiped out (regardless if they were LAMS files or not). So my suggestion is to only delete the files that lams creates, which are the ones that start with lams_* anyway..
actually, they start with lams* not lams_* (ie: lamstmp_* and lamszip_*
- Only files with "lams" prefix deleted on startup - Instead of temp dir being a startup constant, it is a fetched via a method in FileUtil that: - Creates the directory if writable and exists - Returns the specified temp if its writeable - Otherwise returns the java temp
- Only files with "lams" prefix deleted on startup
- Instead of temp dir being a startup constant, it is a fetched via a method in FileUtil that: - Creates the directory if writable and exists - Returns the specified temp if its writeable - Otherwise returns the java temp Affects lams_contentrepository, lams_central, lams_common and lams_learning, so recommend retest of areas that access the temp dir
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
From now on temp dir used is the one specified in db - if it does not exist or the lams user cant access it, it falls back to the java default os temp dir
The files in the temp dir are also deleted each time lams is restarted