New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default project-path broken on OS X #1175

Closed
Siltala opened this Issue May 21, 2017 · 1 comment

Comments

Projects
None yet
2 participants
@Siltala

Siltala commented May 21, 2017

Apparently, Player 0.5.1 fails to correctly detect the project path in OS X unless it's explicitly set.
Error message when running easyrpg-player in a game directory:

"Error: is not a valid path"

Things work fine with the --project-path . or --project-path $PWD parameter set. Tested with a couple of games, so it doesn't seem to be game specific.

@carstene1ns

This comment has been minimized.

Show comment
Hide comment
@carstene1ns

carstene1ns May 21, 2017

Member

This is a bug introduced in dbb08a4. Untested patch:

diff --git a/src/main_data.cpp b/src/main_data.cpp
index 259a32ba..58f4b300 100644
--- a/src/main_data.cpp
+++ b/src/main_data.cpp
@@ -157,6 +157,8 @@ void Main_Data::Init() {
                                project_path = data_dir;
 
                                free(data_dir);
+                       } else {
+                               project_path = "."; // we could also use current_dir
                        }
 #  else
                        project_path = ".";
Member

carstene1ns commented May 21, 2017

This is a bug introduced in dbb08a4. Untested patch:

diff --git a/src/main_data.cpp b/src/main_data.cpp
index 259a32ba..58f4b300 100644
--- a/src/main_data.cpp
+++ b/src/main_data.cpp
@@ -157,6 +157,8 @@ void Main_Data::Init() {
                                project_path = data_dir;
 
                                free(data_dir);
+                       } else {
+                               project_path = "."; // we could also use current_dir
                        }
 #  else
                        project_path = ".";

@carstene1ns carstene1ns added this to the 0.5.2 milestone May 21, 2017

carstene1ns added a commit to carstene1ns/easyrpg-player that referenced this issue May 25, 2017

Fix EasyRPG#1175: Use default project-path under OSX
This also simplifies project path finding it on all platforms.

carstene1ns added a commit to carstene1ns/easyrpg-player that referenced this issue May 25, 2017

Fix EasyRPG#1175: Use default project-path under OSX
This also tries to simplify project path finding it on all platforms.

@carstene1ns carstene1ns self-assigned this May 25, 2017

@Ghabry Ghabry closed this in e62fa98 Jun 27, 2017

Ghabry pushed a commit to libretro/easyrpg-libretro that referenced this issue May 22, 2018

Fix EasyRPG#1175: Use default project-path under OSX
This also tries to simplify project path finding it on all platforms.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment