diff options
| author | Linus Färnstrand <linus@mullvad.net> | 2017-09-04 17:40:39 +0200 |
|---|---|---|
| committer | Linus Färnstrand <linus@mullvad.net> | 2017-09-04 17:40:39 +0200 |
| commit | 03b2831fadf9588e2514962dfe778bbc7a885381 (patch) | |
| tree | 07f3ebdfc8a3a599d066c0cf94538e2bf6811f93 /mullvad-daemon/src | |
| parent | 3fac53b1d3e4d051b40b67232b67ae85886b0b19 (diff) | |
| parent | 4ace9658142625bca415d4c0537b6a6be44a0105 (diff) | |
| download | mullvadvpn-03b2831fadf9588e2514962dfe778bbc7a885381.tar.xz mullvadvpn-03b2831fadf9588e2514962dfe778bbc7a885381.zip | |
Merge branch 'set-tmp-path-hardcoded'
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()) |
