Skip to content

Commit

Permalink
Fix exportlang command
Browse files Browse the repository at this point in the history
It was failing when the output directory already existed

(cherry picked from commit cf8b7b2)
  • Loading branch information
D-Cysteine authored and Dream-Master committed May 19, 2024
1 parent 033b535 commit bf53a13
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ public static void exportLang(@Nullable ICommandSender sender, @Nullable String
QuestLineDatabase.INSTANCE.values()
.forEach(questLine -> questOccurrenceCount.addAll(questLine.keySet()));

if (!dataDir.mkdirs()) {
if (!dataDir.exists() && !dataDir.mkdirs()) {
QuestingAPI.getLogger().log(Level.ERROR, "Failed to create directory\n{}", dataDir);
sendChatMessage(sender, "betterquesting.cmd.error");
return;
Expand Down

0 comments on commit bf53a13

Please sign in to comment.