Closed janblom closed 1 year ago
Looks fine to me. Just to clarify, the only way to be sure that you can write to a directory is to actually write a file to it. Unfortunately, Files.isWritable
is not enough because it doesn't test all additional directory annotations that may exist.
It would be good to add a README / Wiki line about this new property.
FYI, on windows, changing the TMP
environment value also changes the base temp directory. On all systems, java -Djava.io.tmpdir=/path/to/tmpdir
changes the base temp directory.
The proposed solution is to only use an alternative strategy for the tmp dir for Apache poi if the readonly situation situation. If not, proceed as before. A property
org.ohdsi.whiterabbit.poi.tmpdir
can be optionally used to control the location where the tmp dir is created.Solves issue 293