mirror of
https://github.com/latex-lsp/texlab.git
synced 2025-07-07 21:25:32 +00:00
Use XDG_RUNTIME_DIR for texlab.sock
in linux (#1331)
This commit is contained in:
parent
da6a6bbb9f
commit
e01b909c6a
5 changed files with 7 additions and 2 deletions
1
Cargo.lock
generated
1
Cargo.lock
generated
|
@ -940,6 +940,7 @@ name = "ipc"
|
|||
version = "0.0.0"
|
||||
dependencies = [
|
||||
"crossbeam-channel",
|
||||
"dirs 6.0.0",
|
||||
"expect-test",
|
||||
"log",
|
||||
"parser",
|
||||
|
|
|
@ -16,6 +16,7 @@ rust-version = "1.80"
|
|||
anyhow = "1.0.95"
|
||||
criterion = "0.5.1"
|
||||
crossbeam-channel = "0.5.14"
|
||||
dirs = "6.0.0"
|
||||
expect-test = "1.5.1"
|
||||
itertools = "0.13.0"
|
||||
log = "0.4.25"
|
||||
|
|
|
@ -8,7 +8,7 @@ rust-version.workspace = true
|
|||
|
||||
[dependencies]
|
||||
bibtex-utils = { path = "../bibtex-utils" }
|
||||
dirs = "6.0.0"
|
||||
dirs.workspace = true
|
||||
distro = { path = "../distro" }
|
||||
itertools.workspace = true
|
||||
line-index = { path = "../line-index" }
|
||||
|
|
|
@ -8,6 +8,7 @@ rust-version.workspace = true
|
|||
|
||||
[dependencies]
|
||||
crossbeam-channel.workspace = true
|
||||
dirs.workspace = true
|
||||
serde.workspace = true
|
||||
serde_json.workspace = true
|
||||
log.workspace = true
|
||||
|
|
|
@ -12,7 +12,9 @@ use std::os::unix::net::{UnixListener, UnixStream};
|
|||
use uds_windows::{UnixListener, UnixStream};
|
||||
|
||||
fn socket_path() -> PathBuf {
|
||||
std::env::temp_dir().join("texlab.sock")
|
||||
dirs::runtime_dir()
|
||||
.unwrap_or(std::env::temp_dir())
|
||||
.join("texlab.sock")
|
||||
}
|
||||
|
||||
pub fn send_request<T: Serialize>(msg: T) -> io::Result<()> {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue