mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-19 11:07:43 +00:00
5062: replace createParentDirs.
This commit is contained in:
parent
dcf1c81fe9
commit
b09bd0517e
@ -29,6 +29,7 @@ import java.io.BufferedInputStream;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
|
import java.nio.file.Path;
|
||||||
import java.nio.file.Paths;
|
import java.nio.file.Paths;
|
||||||
import java.text.MessageFormat;
|
import java.text.MessageFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
@ -798,7 +799,12 @@ public class ImageUtils {
|
|||||||
imageSaver.execute(() -> {
|
imageSaver.execute(() -> {
|
||||||
try {
|
try {
|
||||||
synchronized (cacheFile) {
|
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()) {
|
if (cacheFile.exists()) {
|
||||||
cacheFile.delete();
|
cacheFile.delete();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user