INNER CODE UNIT · Rust

license_file_path

upvpn/upvpn-app · upvpn-config/src/lib.rs:147

    pub fn license_file_path(&self) -> PathBuf {
        if self.license_file_path.is_some() {
            return self.license_file_path.clone().unwrap();
        }
        #[cfg(target_os = "linux")]
        return PathBuf::from_str("/opt/upvpn/upvpn-oss-licenses.html").unwrap();
        #[cfg(target_os = "macos")]
        return PathBuf::from_str(
            "/Applications/upvpn.app/Contents/Resources/upvpn-oss-licenses.html",
        )
        .unwrap();
        #[cfg(target_os = "windows")]
        return PathBuf::from(std::env::var("PROGRAMFILES").unwrap_or(
            std::env::var("ProgramFiles").expect("missing PROGRAMFILES and ProgramFiles env var"),
        ))
        .join("upvpn")
        .join("upvpn-oss-licenses.html");
    }

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…