forked from organicmaps/organicmaps-tmp
[platform] don't fail on dbus-less environments (like buildfarm)
This commit is contained in:
parent
3a5d3fab09
commit
088c33c114
1 changed files with 8 additions and 3 deletions
|
@ -104,10 +104,15 @@ string Platform::UniqueClientId() const
|
|||
if (IsFileExistsByFullPath("/etc/machine-id"))
|
||||
machineFile = "/etc/machine-id";
|
||||
|
||||
string content;
|
||||
FileReader(machineFile).ReadAsString(content);
|
||||
if (IsFileExistsByFullPath(machineFile))
|
||||
{
|
||||
string content;
|
||||
FileReader(machineFile).ReadAsString(content);
|
||||
return content.substr(0, 32);
|
||||
}
|
||||
else
|
||||
return "n0dbus0n0lsb00000000000000000000";
|
||||
|
||||
return content.substr(0, 32);
|
||||
}
|
||||
|
||||
void Platform::RunOnGuiThread(TFunctor const & fn)
|
||||
|
|
Loading…
Add table
Reference in a new issue