Skip to content

Commit

Permalink
fix caller being null
Browse files Browse the repository at this point in the history
  • Loading branch information
Jsinco committed Nov 16, 2024
1 parent 2864766 commit bfc9056
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
}

group = "dev.jsinco.discord"
version = "1.4"
version = "1.5"

repositories {
mavenCentral()
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/dev/jsinco/discord/framework/FrameWork.java
Original file line number Diff line number Diff line change
Expand Up @@ -48,11 +48,11 @@ public final class FrameWork {


public static void start(Class<?> caller) {
start(caller, getDefaultDataFolderPath("data"));
start(caller, getDefaultDataFolderPath(caller, "data"));
}

public static void start(Class<?> caller, String dataFolderName) {
start(caller, getDefaultDataFolderPath(dataFolderName));
start(caller, getDefaultDataFolderPath(caller, dataFolderName));
}

public static void start(Class<?> caller, Path dataFolderPath) {
Expand Down Expand Up @@ -220,7 +220,7 @@ public static void injectStaticFields() {
}


public static Path getDefaultDataFolderPath(String folderName) {
public static Path getDefaultDataFolderPath(Class<?> caller, String folderName) {
String path = caller.getProtectionDomain().getCodeSource().getLocation().getPath();
File jarFile = new File(path);
String jarDir = jarFile.getParentFile().getAbsolutePath();
Expand Down

0 comments on commit bfc9056

Please sign in to comment.