summaryrefslogtreecommitdiffhomepage
path: root/mullvad-daemon/src
diff options
context:
space:
mode:
Diffstat (limited to 'mullvad-daemon/src')
-rw-r--r--mullvad-daemon/src/rpc_info.rs8
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())