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

Resolves #2825.
This commit is contained in:
Charles Dang 2018-04-07 19:31:12 +11:00
parent 6be41f51a5
commit d786fd6622

View file

@ -495,6 +495,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')) {