forked from Qortal/qortal
Fixed bug when trying to delete a file instead of a directory.
This commit is contained in:
parent
c588786a06
commit
02eab89d82
@ -222,7 +222,7 @@ public class ArbitraryDataCleanupManager extends Thread {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If the directory is empty, we still need to delete its parent folder
|
// If the directory is empty, we still need to delete its parent folder
|
||||||
if (contentsCount == 0 && tempDir.toFile().exists()) {
|
if (contentsCount == 0 && tempDir.toFile().isDirectory() && tempDir.toFile().exists()) {
|
||||||
try {
|
try {
|
||||||
LOGGER.info("Parent directory {} is empty, so deleting it", tempDir);
|
LOGGER.info("Parent directory {} is empty, so deleting it", tempDir);
|
||||||
FilesystemUtils.safeDeleteDirectory(tempDir, false);
|
FilesystemUtils.safeDeleteDirectory(tempDir, false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user