diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2017-09-04 15:17:54 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2017-09-04 15:18:09 +0200 |
| commit | d2e86d5af3fb76d281d2a4e21298b4b1e36253dc (patch) | |
| tree | 944c4a816589715601d8bfcea502887151e70e51 /mullvad-daemon/src | |
| parent | 3fac53b1d3e4d051b40b67232b67ae85886b0b19 (diff) | |
| download | mullvadvpn-d2e86d5af3fb76d281d2a4e21298b4b1e36253dc.tar.xz mullvadvpn-d2e86d5af3fb76d281d2a4e21298b4b1e36253dc.zip | |
Hardcode tmp path to /tmp on unix
Diffstat (limited to 'mullvad-daemon/src')
| -rw-r--r-- | mullvad-daemon/src/rpc_info.rs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mullvad-daemon/src/rpc_info.rs b/mullvad-daemon/src/rpc_info.rs index 25078ff899..64dad4258b 100644 --- a/mullvad-daemon/src/rpc_info.rs +++ b/mullvad-daemon/src/rpc_info.rs @@ -15,11 +15,19 @@ error_chain! { } } +#[cfg(unix)] +lazy_static! { + /// The path to the file where we write the RPC address + static ref RPC_ADDRESS_FILE_PATH: PathBuf = Path::new("/tmp").join(".mullvad_rpc_address"); +} + +#[cfg(not(unix))] lazy_static! { /// The path to the file where we write the RPC address static ref RPC_ADDRESS_FILE_PATH: PathBuf = ::std::env::temp_dir().join(".mullvad_rpc_address"); } + /// Writes down the RPC address to some API to a file. pub fn write(rpc_address: &str) -> Result<()> { open_file(RPC_ADDRESS_FILE_PATH.as_path()) |
