aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorLulu13022002 <[email protected]>2022-10-13 13:38:06 +0200
committerGitHub <[email protected]>2022-10-13 13:38:06 +0200
commit20940114856394bdfb4b3a80222e2d5de7d7b947 (patch)
tree3daebd6a17e7133cff6dc2fe4e905c079d71641f
parent514a60647d0b78c478a00da5a773fcc646327bdd (diff)
downloadPaper-20940114856394bdfb4b3a80222e2d5de7d7b947.tar.gz
Paper-20940114856394bdfb4b3a80222e2d5de7d7b947.zip
Update settings directory path in exceptions (#7968)
-rw-r--r--patches/server/0004-Paper-config-files.patch6
1 files changed, 3 insertions, 3 deletions
diff --git a/patches/server/0004-Paper-config-files.patch b/patches/server/0004-Paper-config-files.patch
index 7470ff30f6..b40c4708f2 100644
--- a/patches/server/0004-Paper-config-files.patch
+++ b/patches/server/0004-Paper-config-files.patch
@@ -1241,17 +1241,17 @@ index 0000000000000000000000000000000000000000..1055a079a061d8761be13d3b9efbbd90
+ final String legacyFileName = legacyConfig.getFileName().toString();
+ try {
+ if (Files.exists(configDir) && !Files.isDirectory(configDir)) {
-+ throw new RuntimeException("Paper needs to create a '" + CONFIG_DIR + "' folder in the root of your server. You already have a non-directory named '" + CONFIG_DIR + "'. Please remove it and restart the server.");
++ throw new RuntimeException("Paper needs to create a '" + configDir.toAbsolutePath() + "' folder. You already have a non-directory named '" + configDir.toAbsolutePath() + "'. Please remove it and restart the server.");
+ }
+ final Path backupDir = configDir.resolve(BACKUP_DIR);
+ if (Files.exists(backupDir) && !Files.isDirectory(backupDir)) {
-+ throw new RuntimeException("Paper needs to create a '" + BACKUP_DIR + "' directory in the '" + CONFIG_DIR + "' folder. You already have a non-directory named '" + BACKUP_DIR + "'. Please remove it and restart the server.");
++ throw new RuntimeException("Paper needs to create a '" + BACKUP_DIR + "' directory in the '" + configDir.toAbsolutePath() + "' folder. You already have a non-directory named '" + BACKUP_DIR + "'. Please remove it and restart the server.");
+ }
+ createDirectoriesSymlinkAware(backupDir);
+ final String backupFileName = legacyFileName + ".old";
+ final Path legacyConfigBackup = backupDir.resolve(backupFileName);
+ if (Files.exists(legacyConfigBackup) && !Files.isRegularFile(legacyConfigBackup)) {
-+ throw new RuntimeException("Paper needs to create a '" + backupFileName + "' file in the '" + BACKUP_DIR + "' folder. You already have a non-file named '" + backupFileName + "'. Please remove it and restart the server.");
++ throw new RuntimeException("Paper needs to create a '" + backupFileName + "' file in the '" + backupDir.toAbsolutePath() + "' folder. You already have a non-file named '" + backupFileName + "'. Please remove it and restart the server.");
+ }
+ Files.move(legacyConfig.toRealPath(), legacyConfigBackup, StandardCopyOption.REPLACE_EXISTING); // make backup
+ if (Files.isSymbolicLink(legacyConfig)) {