mirror of
https://gitlab.com/2009scape/rt4-client.git
synced 2025-12-09 16:45:46 -07:00
Use on Linux/BSD if it's defined
This commit is contained in:
parent
a103651b39
commit
fb1f31ba43
1 changed files with 6 additions and 2 deletions
|
|
@ -200,7 +200,9 @@ public final class SignLink implements Runnable {
|
|||
// 2009scape-specific behavior
|
||||
if (osName.startsWith("linux")) {
|
||||
File oldCache = new File(homeDir + "/.runite_rs");
|
||||
homeDir = homeDir + ".local/share/2009scape/";
|
||||
// Use XDG_DATA_HOME if it exists, otherwise default to ~/.local/share
|
||||
homeDir = System.getenv("XDG_DATA_HOME") != null ? System.getenv("XDG_DATA_HOME") : homeDir + ".local/share";
|
||||
homeDir = homeDir + "/2009scape/";
|
||||
File newCache = new File(homeDir + "cache");
|
||||
if (oldCache.isDirectory() && !newCache.exists()) {
|
||||
Files.move(oldCache.toPath(), newCache.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||
|
|
@ -214,7 +216,9 @@ public final class SignLink implements Runnable {
|
|||
// 2009scape-specific behavior
|
||||
if (osName.startsWith("linux")) {
|
||||
File oldCache = new File(homeDir + "/.runite_rs");
|
||||
homeDir = homeDir + ".local/share/2009scape/";
|
||||
// Use XDG_DATA_HOME if it exists, otherwise default to ~/.local/share
|
||||
homeDir = System.getenv("XDG_DATA_HOME") != null ? System.getenv("XDG_DATA_HOME") : homeDir + ".local/share";
|
||||
homeDir = homeDir + "/2009scape/";
|
||||
File newCache = new File(homeDir + "cache");
|
||||
if (oldCache.isDirectory() && !newCache.exists()) {
|
||||
Files.move(oldCache.toPath(), newCache.toPath(), StandardCopyOption.REPLACE_EXISTING);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue