Skip to content

Commit

Permalink
fix: fix #216
Browse files Browse the repository at this point in the history
Signed-off-by: NikOverflow <[email protected]>
  • Loading branch information
NikOverflow committed Mar 11, 2024
1 parent 0714ba4 commit 966630a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pypresence/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def get_ipc_path(pipe=None):
ipc = f"{ipc}{pipe}"

if sys.platform in ('linux', 'darwin'):
tempdir = (os.environ.get('XDG_RUNTIME_DIR') or tempfile.gettempdir())
tempdir = os.environ.get('XDG_RUNTIME_DIR') or (f"/run/user/{os.getuid()}" if os.path.exists(f"/run/user/{os.getuid()}") else tempfile.gettempdir())
paths = ['.', 'snap.discord', 'app/com.discordapp.Discord', 'app/com.discordapp.DiscordCanary']
elif sys.platform == 'win32':
tempdir = r'\\?\pipe'
Expand Down

0 comments on commit 966630a

Please sign in to comment.