fix pathfinder for skins

This commit is contained in:
darkrose 2014-11-17 18:41:32 +10:00
parent e499f8643a
commit 4e08e19c76
1 changed files with 3 additions and 3 deletions

View File

@ -149,7 +149,7 @@ std::string getPath(const char* tp, const std::string &filename, bool must_exist
std::string data_path = g_settings->get("data_path");
if (data_path != "") {
std::string testpath = data_path + DIR_DELIM + rel_path;
if (type == "model" || type == "html" || type == "sound" || type == "font") {
if (type == "model" || type == "html" || type == "sound" || type == "skin" || type == "font") {
if (fs::PathExists(testpath))
fullpath = std::string(testpath);
}else{
@ -160,7 +160,7 @@ std::string getPath(const char* tp, const std::string &filename, bool must_exist
/* check from user data directory */
if (fullpath == "") {
std::string testpath = porting::path_userdata + DIR_DELIM + rel_path;
if (type == "model" || type == "html" || type == "sound" || type == "font") {
if (type == "model" || type == "html" || type == "sound" || type == "skin" || type == "font") {
if (fs::PathExists(testpath))
fullpath = std::string(testpath);
}else{
@ -171,7 +171,7 @@ std::string getPath(const char* tp, const std::string &filename, bool must_exist
/* check from default data directory */
if (fullpath == "") {
std::string testpath = porting::path_data + DIR_DELIM + rel_path;
if (type == "model" || type == "html" || type == "sound" || type == "font") {
if (type == "model" || type == "html" || type == "sound" || type == "skin" || type == "font") {
if (fs::PathExists(testpath))
fullpath = std::string(testpath);
}else{