From 318a5fcd0d91f9ced4797d068e71b267c3f66f8a Mon Sep 17 00:00:00 2001 From: "simon.kagstrom" Date: Sun, 7 Feb 2010 17:04:27 +0000 Subject: [PATCH] Fix stat check, reorder paths and add . (CWD) --- Src/main.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Src/main.cpp b/Src/main.cpp index 776b464..87332da 100644 --- a/Src/main.cpp +++ b/Src/main.cpp @@ -163,7 +163,7 @@ const char *try_path(const char *path, const char *file) const char *out = NULL; sprintf(what, "%s/%s", path, file); - if (stat(what, &st) < 0) + if (stat(what, &st) == 0) out = what; return out; @@ -174,9 +174,10 @@ void Frodo::LoadFrodorc() const char *paths[] = { NULL, // Filled in below NULL, // also filled in below + ".", + "/apps/frodo", // Wii "frodo", - "/usr/share/frodo/", - "/apps/frodo", + "/usr/share/frodo", NULL, }; const char *prefs_path = NULL;