Image: handle case where l10n-track file is not present

Resolves #2825.

(cherry-picked from commit d786fd6622)
This commit is contained in:
Charles Dang 2018-04-07 19:31:12 +11:00
parent a4ece0ce2d
commit c37baf10a4

View file

@ -476,6 +476,12 @@ static bool localized_file_uptodate(const std::string& loc_file)
// First call, parse track index to collect fuzzy files by path.
std::string fsep = "\xC2\xA6"; // UTF-8 for "broken bar"
std::string trackpath = filesystem::get_binary_file_location("", "l10n-track");
// l10n-track file not present. Assume image is up-to-date.
if(trackpath.empty()) {
return true;
}
std::string contents = filesystem::read_file(trackpath);
for(const std::string& line : utils::split(contents, '\n')) {