From cb0039c096082261afe898ef586563b284aa8051 Mon Sep 17 00:00:00 2001 From: Piotr Siuszko Date: Sun, 25 Sep 2022 19:12:31 +0200 Subject: [PATCH] Get projects form registry windows only --- rusty_hub/src/unity_project.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/rusty_hub/src/unity_project.rs b/rusty_hub/src/unity_project.rs index ab19d29..23da4ed 100644 --- a/rusty_hub/src/unity_project.rs +++ b/rusty_hub/src/unity_project.rs @@ -1,4 +1,3 @@ -use registry::{Hive, Security}; use std::{path::Path, str}; #[derive(Debug, Serialize, Deserialize, Clone)] @@ -9,7 +8,13 @@ pub struct UnityProject { } impl UnityProject { + #[cfg(not(target_os = "windows"))] pub fn get_projects_from_registry() -> Vec { + Vec::new() + } + #[cfg(target_os = "windows")] + pub fn get_projects_from_registry() -> Vec { + use registry::{Hive, Security}; let mut projects = Vec::new(); let key = Hive::CurrentUser