mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-22 02:26:00 +01:00
Add NoSuchFileException to be catched in AtomicFileHelper
This commit is contained in:
parent
e326939021
commit
999c148ded
@ -28,10 +28,7 @@
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
import java.nio.file.StandardCopyOption;
|
||||
import java.nio.file.StandardOpenOption;
|
||||
import java.nio.file.*;
|
||||
|
||||
public class AtomicFileHelper {
|
||||
|
||||
@ -52,11 +49,11 @@ public static OutputStream createFilepartOutputStream(final Path file) throws IO
|
||||
|
||||
try {
|
||||
Files.move(partFile, file, StandardCopyOption.ATOMIC_MOVE);
|
||||
} catch (FileNotFoundException ignore) {
|
||||
} catch (FileNotFoundException | NoSuchFileException ignore) {
|
||||
} catch (IOException ex) {
|
||||
try {
|
||||
Files.move(partFile, file);
|
||||
} catch (FileNotFoundException ignore) {}
|
||||
} catch (FileNotFoundException | NoSuchFileException ignore) {}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user