mirror of
https://github.com/ViaVersion/ViaNBT.git
synced 2024-09-27 03:52:40 +02:00
Fix write if the path has no parent
This commit is contained in:
parent
8149ec3bd0
commit
d43da3189e
2
pom.xml
2
pom.xml
@ -5,7 +5,7 @@
|
||||
|
||||
<groupId>com.viaversion</groupId>
|
||||
<artifactId>nbt</artifactId>
|
||||
<version>4.4.4</version>
|
||||
<version>4.4.5</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>ViaNBT</name>
|
||||
|
@ -60,7 +60,9 @@ public final class TagWriter {
|
||||
*/
|
||||
public void write(final Path path, final Tag tag, final boolean compressed) throws IOException {
|
||||
if (!Files.exists(path)) {
|
||||
if (path.getParent() != null) {
|
||||
Files.createDirectories(path.getParent());
|
||||
}
|
||||
Files.createFile(path);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user