Fix #5429 properly, without breaking symlinks on linux..

Signed-off-by: cpw <cpw+github@weeksfamily.ca>
This commit is contained in:
cpw 2019-02-10 15:58:12 -05:00
parent c6afb2be3f
commit c25214aaf4
No known key found for this signature in database
GPG Key ID: 8EB3DF749553B1B7
1 changed files with 3 additions and 0 deletions

View File

@ -34,6 +34,9 @@ public class FileUtils
private static final Logger LOGGER = LogManager.getLogger();
public static Path getOrCreateDirectory(Path dirPath, String dirLabel) {
if (!Files.isDirectory(dirPath.getParent())) {
getOrCreateDirectory(dirPath.getParent(), "parent of "+dirLabel);
}
if (!Files.isDirectory(dirPath))
{
LOGGER.debug(CORE,"Making {} directory : {}", dirLabel, dirPath);