mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-25 12:05:13 +01:00
Tentative fix trying to move a non-existing filepart file
This commit is contained in:
parent
8eb74004c6
commit
1d11206d13
@ -24,6 +24,8 @@
|
||||
*/
|
||||
package de.bluecolored.bluemap.core.util;
|
||||
|
||||
import de.bluecolored.bluemap.core.logger.Logger;
|
||||
|
||||
import java.io.*;
|
||||
import java.nio.file.*;
|
||||
|
||||
@ -39,6 +41,8 @@ public static OutputStream createFilepartOutputStream(final Path file) throws IO
|
||||
|
||||
OutputStream os = Files.newOutputStream(partFile, StandardOpenOption.WRITE, StandardOpenOption.TRUNCATE_EXISTING, StandardOpenOption.CREATE);
|
||||
return new WrappedOutputStream(os, () -> {
|
||||
if (!Files.exists(partFile)) return;
|
||||
|
||||
Files.deleteIfExists(file);
|
||||
Files.createDirectories(file.getParent());
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user