From a9a65f5aa5a58cf52bb581028ec7712d57f3bafe Mon Sep 17 00:00:00 2001 From: altalk23 <45172705+altalk23@users.noreply.github.com> Date: Sat, 13 Apr 2024 01:14:58 +0300 Subject: [PATCH] fix migrate_location --- src/util/config.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/config.rs b/src/util/config.rs index 6035c65..8c29955 100644 --- a/src/util/config.rs +++ b/src/util/config.rs @@ -125,9 +125,9 @@ pub fn geode_root() -> PathBuf { data_dir } -fn migrate_location(name: &str, mut path: PathBuf) -> PathBuf { +fn migrate_location(name: &str, mut path: PathBuf, platform: &str) -> PathBuf { // Migrate folder to executable - if (cfg!(target_os = "windows") || cfg!(target_os = "linux")) && path.is_dir() { + if (platform == "win") && path.is_dir() { path.push("GeometryDash.exe"); if !path.exists() { @@ -147,7 +147,7 @@ fn migrate_location(name: &str, mut path: PathBuf) -> PathBuf { impl Profile { pub fn new(name: String, location: PathBuf, platform: String) -> Profile { Profile { - gd_path: migrate_location(&name, location), + gd_path: migrate_location(&name, location, &platform), name, platform, other: HashMap::::new(),