mirror of
https://github.com/jiriks74/presence.nvim
synced 2024-12-27 18:42:35 +01:00
fix(Flatpak): clear sock_path if the flatpak socket wasn't found
This commit is contained in:
parent
ff8442c168
commit
0601dd513e
1 changed files with 2 additions and 0 deletions
|
@ -397,6 +397,8 @@ function Presence:get_discord_socket_path()
|
|||
xdg_path = xdg_path and xdg_path:match("/$") and xdg_path.."app/com.discordapp.Discord" or xdg_path.."/app/com.discordapp.Discord"
|
||||
self.log:debug(string.format("Using XDG runtime path: %s", xdg_path))
|
||||
sock_path = xdg_path:match("/$") and xdg_path..sock_name or xdg_path.."/"..sock_name
|
||||
-- Check if the socket path exists and if not set it to nil
|
||||
sock_path = vim.fn.filereadable(sock_path) == 1 and sock_path or nil
|
||||
end
|
||||
|
||||
-- If the socket path is still nil, check other temp directories
|
||||
|
|
Loading…
Reference in a new issue