5062: replace createParentDirs.

This commit is contained in:
Raman 2019-05-10 14:31:14 -04:00
parent dcf1c81fe9
commit b09bd0517e

View File

@ -29,6 +29,7 @@ import java.io.BufferedInputStream;
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.text.MessageFormat;
import java.util.ArrayList;
@ -798,7 +799,12 @@ public class ImageUtils {
imageSaver.execute(() -> {
try {
synchronized (cacheFile) {
Files.createParentDirs(cacheFile);
Path path = Paths.get(cacheFile.getParent());
File thumbsDir = Paths.get(cacheFile.getParent()).toFile();
if (!thumbsDir.exists()) {
thumbsDir.mkdirs();
}
if (cacheFile.exists()) {
cacheFile.delete();
}