diff --git a/Core/src/org/sleuthkit/autopsy/coreutils/ImageUtils.java b/Core/src/org/sleuthkit/autopsy/coreutils/ImageUtils.java index 5a3b75ca69..97922760c5 100644 --- a/Core/src/org/sleuthkit/autopsy/coreutils/ImageUtils.java +++ b/Core/src/org/sleuthkit/autopsy/coreutils/ImageUtils.java @@ -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(); }