Skip to content

Commit

Permalink
Darnit
Browse files Browse the repository at this point in the history
  • Loading branch information
XyperCode committed Apr 2, 2024
1 parent 9a611c8 commit 605d18f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions src/main/java/PreMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ public static void main(String[] args) throws IOException {

Path appData;
if (osName.startsWith("windows")) appData = Path.of(System.getenv("APPDATA"));
else if (osName.startsWith("linux")) appData = Path.of("~/.config/");
else if (osName.startsWith("mac")) appData = Path.of("~/Library/Applications Support");
else if (osName.startsWith("linux")) appData = Path.of(System.getProperty("user.home") + "/.config/");
else if (osName.startsWith("mac")) appData = Path.of(System.getProperty("user.home") + "/Library/Applications Support");
else throw new UnsupportedOperationException("Unsupported OS: " + System.getProperty("os.name"));

var dataDir = appData.resolve("UltreonBrowser");
Expand Down
8 changes: 4 additions & 4 deletions src/main/kotlin/main.kt
Original file line number Diff line number Diff line change
Expand Up @@ -132,14 +132,14 @@ fun path(path: String, vararg siblings: String): Path {

val appData: File = when {
isWindows() -> File(System.getenv("APPDATA").toString())
isLinux() -> File("~/.config/")
isMacintosh() -> File("~/Library/Applications Support")
isLinux() -> File(System.getProperty("user.home").toString() + "/.config/")
isMacintosh() -> File(System.getProperty("user.home").toString() + "/Library/Applications Support")
else -> throw UnsupportedOperationException("Unsupported operating system: $osName")
}
val homeDir: File = when {
isWindows() -> File(System.getProperty("user.home").toString())
isLinux() -> File("~/")
isMacintosh() -> File("~/")
isLinux() -> File(System.getProperty("user.home").toString() + "/")
isMacintosh() -> File(System.getProperty("user.home").toString() + "/")
else -> File(System.getProperty("user.home").toString())
}
val dataDir: File = File(appData, "UltreonBrowser")

0 comments on commit 605d18f

Please sign in to comment.