mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-27 13:15:44 +01:00
Ignore FileAlreadyExistsException in MoreFiles#createDirectories (#2525)
This commit is contained in:
parent
fea757887c
commit
ac9706b83f
@ -27,6 +27,7 @@ package me.lucko.luckperms.common.util;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.nio.file.DirectoryStream;
|
||||
import java.nio.file.FileAlreadyExistsException;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
|
||||
@ -45,7 +46,12 @@ public final class MoreFiles {
|
||||
return path;
|
||||
}
|
||||
|
||||
Files.createDirectory(path);
|
||||
try {
|
||||
Files.createDirectory(path);
|
||||
} catch (FileAlreadyExistsException e) {
|
||||
// ignore
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
@ -54,7 +60,12 @@ public final class MoreFiles {
|
||||
return path;
|
||||
}
|
||||
|
||||
Files.createDirectories(path);
|
||||
try {
|
||||
Files.createDirectories(path);
|
||||
} catch (FileAlreadyExistsException e) {
|
||||
// ignore
|
||||
}
|
||||
|
||||
return path;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user