diff options
| author | OmniTroid <davidskoland@gmail.com> | 2017-03-29 22:01:16 +0200 |
|---|---|---|
| committer | OmniTroid <davidskoland@gmail.com> | 2017-03-29 22:01:16 +0200 |
| commit | 244339645d438ca2171f61c59304a80d12cafd9a (patch) | |
| tree | a59e2efc99eff597a2a2cd7a593939d5448839d5 | |
| parent | b92981ff9578b2cfb9b173b9d56146459a65fb7b (diff) | |
fixed broken code related to base path
| -rw-r--r-- | aoapplication.h | 1 | ||||
| -rw-r--r-- | path_functions.cpp | 16 |
2 files changed, 7 insertions, 10 deletions
diff --git a/aoapplication.h b/aoapplication.h index 6d9fe03a..b9eea6c5 100644 --- a/aoapplication.h +++ b/aoapplication.h @@ -88,6 +88,7 @@ public: //implementation in path_functions.cpp QString get_base_path(); + QString get_data_path(); QString get_theme_path(); QString get_default_theme_path(); QString get_character_path(QString p_character); diff --git a/path_functions.cpp b/path_functions.cpp index 41793b42..e91b2732 100644 --- a/path_functions.cpp +++ b/path_functions.cpp @@ -18,19 +18,15 @@ QString AOApplication::get_base_path() #elif defined(ANDROID) return "/storage/extSdCard/AO2/"; #else - QString default_path = "/base/"; - QString alt_path = "/data/"; - - if (dir_exists(default_path)) - return QDir::currentPath() + default_path; - else if (dir_exists(alt_path)) - return QDir::currentPath() + alt_path; - else - return QDir::currentPath() + default_path; - + return QDir::currentPath() + "/base/"; #endif } +QString AOApplication::get_data_path() +{ + return get_base_path() + "data/"; +} + QString AOApplication::get_theme_path() { return get_base_path() + "themes/" + user_theme.toLower() + "/"; |
