From 64380de497130b560edba6abacf4c1b7069f12bd Mon Sep 17 00:00:00 2001 From: Andrew Steinborn Date: Sun, 28 Oct 2018 01:45:20 -0400 Subject: [PATCH] Fix startup. --- .../com/velocitypowered/proxy/config/AnnotatedConfig.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/proxy/src/main/java/com/velocitypowered/proxy/config/AnnotatedConfig.java b/proxy/src/main/java/com/velocitypowered/proxy/config/AnnotatedConfig.java index ccedcdfba..134bb6725 100644 --- a/proxy/src/main/java/com/velocitypowered/proxy/config/AnnotatedConfig.java +++ b/proxy/src/main/java/com/velocitypowered/proxy/config/AnnotatedConfig.java @@ -213,7 +213,7 @@ public abstract class AnnotatedConfig { } /** - * Writes list of strings to file + * Writes list of strings to file. * * @param lines list of strings to write * @param to Path of file where lines should be written @@ -225,7 +225,7 @@ public abstract class AnnotatedConfig { throw new IllegalArgumentException("lines cannot be empty"); } - Path temp = to.getParent().resolve(to.getFileName().toString() + "__tmp"); + Path temp = to.toAbsolutePath().getParent().resolve(to.getFileName().toString() + "__tmp"); Files.write(temp, lines, StandardCharsets.UTF_8, StandardOpenOption.CREATE); try { Files.move(temp, to, StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.ATOMIC_MOVE);