Skip to content

Commit 4983b03

Browse files
authored
XDG_DATA_DIR doesnt exist
1 parent a3e54b4 commit 4983b03

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/bridge/bridge-unix-sockets.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
#include <filesystem>
3434

3535
#define TMP_DIR "/tmp"
36-
#define XDG_DATA_DIR_DEFAULT ".local/share"
36+
#define XDG_DATA_HOME_DEFAULT ".local/share"
3737
#define SLIMEVR_DATA_DIR "dev.slimevr.SlimeVR"
3838
#define SOCKET_NAME "SlimeVRDriver"
3939

@@ -169,7 +169,7 @@ BridgeStatus runBridgeFrame(SlimeVRDriver::VRDriver& driver) {
169169
}
170170
// try using home dir if the vrserver is run in a chroot like
171171
if(!fs::exists(socket)) {
172-
if (const char* ptr = std::getenv("XDG_DATA_DIR")) {
172+
if (const char* ptr = std::getenv("XDG_DATA_HOME")) {
173173
const fs::path data_dir = ptr;
174174
socket = (data_dir / SLIMEVR_DATA_DIR / SOCKET_NAME);
175175
} else if (const char* ptr = std::getenv("HOME")) {

0 commit comments

Comments
 (0)