OHDSI / WhiteRabbit

WhiteRabbit is a small application that can be used to analyse the structure and contents of a database as preparation for designing an ETL. It comes with RabbitInAHat, an application for interactive design of an ETL to the OMOP Common Data Model with the help of the the scan report generated by White Rabbit.
http://ohdsi.github.io/WhiteRabbit
Apache License 2.0
173 stars 85 forks source link

TMP directory for Apache poi can be read-only (Issue 293) #372

Closed janblom closed 1 year ago

janblom commented 1 year ago

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.tmpdircan be optionally used to control the location where the tmp dir is created.

Solves issue 293

blootsvoets commented 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.