diff --git a/src/gettext_boost.cpp b/src/gettext_boost.cpp index 0b2b3a2e942df..073fcaec421f9 100644 --- a/src/gettext_boost.cpp +++ b/src/gettext_boost.cpp @@ -98,25 +98,24 @@ namespace DBG_G << "Searching for po files for domain " << domain << '\n'; std::string path; for(auto base_path : paths) { + DBG_G << "Searching in dir " << base_path << '\n'; if(base_path[base_path.length()-1] != '/') { base_path += '/'; } base_path += domain; base_path += '/'; - std::string try_path = base_path + lang_name_long + ".po"; - DBG_G << " Trying path " << try_path << '\n'; - path = filesystem::get_binary_file_location("", try_path); - if(!path.empty()) { + path = base_path + lang_name_long + ".po"; + DBG_G << " Trying path " << path << '\n'; + if(filesystem::file_exists(path)) { break; } - try_path = base_path + lang_name_short + ".po"; - DBG_G << " Trying path " << try_path << '\n'; - path = filesystem::get_binary_file_location("", try_path); - if(!path.empty()) { + path = base_path + lang_name_short + ".po"; + DBG_G << " Trying path " << path << '\n'; + if(filesystem::file_exists(path)) { break; } } - if(path.empty()) { + if(!filesystem::file_exists(path)) { continue; } std::ifstream po_file;