diff --git a/src/main/java/com/github/psnrigner/discordrpcjava/impl/BaseConnectionUnix.java b/src/main/java/com/github/psnrigner/discordrpcjava/impl/BaseConnectionUnix.java index bbf70cd..c588ce5 100644 --- a/src/main/java/com/github/psnrigner/discordrpcjava/impl/BaseConnectionUnix.java +++ b/src/main/java/com/github/psnrigner/discordrpcjava/impl/BaseConnectionUnix.java @@ -184,17 +184,17 @@ public void register(String applicationId, String command) String desktopFileName = "/discord-" + applicationId + ".desktop"; String desktopFilePath = home + "/.local"; - if (this.mkdir(desktopFilePath)) + if (!this.mkdir(desktopFilePath)) throw new RuntimeException("Failed to create directory '" + desktopFilePath + "'"); desktopFilePath += "/share"; - if (this.mkdir(desktopFilePath)) + if (!this.mkdir(desktopFilePath)) throw new RuntimeException("Failed to create directory '" + desktopFilePath + "'"); desktopFilePath += "/applications"; - if (this.mkdir(desktopFilePath)) + if (!this.mkdir(desktopFilePath)) throw new RuntimeException("Failed to create directory '" + desktopFilePath + "'"); desktopFilePath += desktopFileName;