mirror of
https://github.com/SlimeVR/SlimeVR-Server.git
synced 2026-11-24 02:51:20 -08:00
allow to set the socket dir via SLIMEVR_SOCKET_DIR (#909)
This commit is contained in:
1 parent
1dd1d14d16
commit
7f75f4a44c
2 files changed
+7
-5
No files matched your search
@@ -32,11 +32,13 @@ enum class OperatingSystem(
|
||||
}
|
||||
}
|
||||
|
||||
val tempDirectory: String
|
||||
val socketDirectory: String
|
||||
get() {
|
||||
var dir = System.getenv("SLIMEVR_SOCKET_DIR")
|
||||
if (dir != null) return dir
|
||||
if (currentPlatform == LINUX) {
|
||||
val tmp = System.getenv("XDG_RUNTIME_DIR")
|
||||
if (tmp != null) return tmp
|
||||
dir = System.getenv("XDG_RUNTIME_DIR")
|
||||
if (dir != null) return dir
|
||||
}
|
||||
return System.getProperty("java.io.tmpdir")
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user