Don't error if station doesn't have dir when deleted
This commit is contained in:
@ -112,6 +112,10 @@ public class StationSettings {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void deleteDir() throws IOException {
|
public void deleteDir() throws IOException {
|
||||||
|
if (!Files.exists(stationPath())) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
Files.walkFileTree(stationPath(), new SimpleFileVisitor<Path>() {
|
Files.walkFileTree(stationPath(), new SimpleFileVisitor<Path>() {
|
||||||
@Override
|
@Override
|
||||||
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
|
public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {
|
||||||
|
Reference in New Issue
Block a user