From eb56bf30580fa7ee61ccef2196d604ff6d9fe0b3 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Wed, 22 Feb 2023 12:17:58 -0800 Subject: [PATCH] Fix update folder logging error when no folder exists (#8891) --- patches/server/Paper-Plugins.patch | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/patches/server/Paper-Plugins.patch b/patches/server/Paper-Plugins.patch index 8792d587e0..933f311fd9 100644 --- a/patches/server/Paper-Plugins.patch +++ b/patches/server/Paper-Plugins.patch @@ -489,9 +489,11 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + final Path resolvedUpdateDirectory = pluginDirectory.resolve(updateDirectoryName); + if (!Files.isDirectory(resolvedUpdateDirectory)) { -+ LOGGER.error("Misconfigured update directory!"); -+ LOGGER.error(("Your configured update directory (%s) in bukkit.yml is pointing to a non-directory path. " + -+ "Disabling auto updating functionality.").formatted(resolvedUpdateDirectory)); ++ if (Files.exists(resolvedUpdateDirectory)) { ++ LOGGER.error("Misconfigured update directory!"); ++ LOGGER.error("Your configured update directory ({}) in bukkit.yml is pointing to a non-directory path. " + ++ "Auto updating functionality will not work.", resolvedUpdateDirectory); ++ } + return new PluginInitializerManager(pluginDirectory, null); + } +