Make sure to create entire path for directory, fixes #5429

This commit is contained in:
tterrag 2019-02-04 12:31:47 -05:00
parent e000fd2f8f
commit 77dd9eb883

View file

@ -38,7 +38,7 @@ public class FileUtils
{ {
LOGGER.debug(CORE,"Making {} directory : {}", dirLabel, dirPath); LOGGER.debug(CORE,"Making {} directory : {}", dirLabel, dirPath);
try { try {
Files.createDirectory(dirPath); Files.createDirectories(dirPath);
} catch (IOException e) { } catch (IOException e) {
if (e instanceof FileAlreadyExistsException) { if (e instanceof FileAlreadyExistsException) {
LOGGER.fatal(CORE,"Failed to create {} directory - there is a file in the way", dirLabel); LOGGER.fatal(CORE,"Failed to create {} directory - there is a file in the way", dirLabel);