Skip to content

Commit

Permalink
fix migrate_location
Browse files Browse the repository at this point in the history
  • Loading branch information
altalk23 committed Apr 12, 2024
1 parent 6e584f6 commit a9a65f5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/util/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand All @@ -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::<String, Value>::new(),
Expand Down

0 comments on commit a9a65f5

Please sign in to comment.