Skip to content

Commit

Permalink
Fix force_compat
Browse files Browse the repository at this point in the history
Probably fix Trove.sing_url (tkashkin#77)


Former-commit-id: 22b0ab5
  • Loading branch information
tkashkin committed Sep 17, 2018
1 parent 42b29bb commit 6263673
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion src/data/Game.vala
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,8 @@ namespace GameHub.Data
{
get
{
return install_dir.get_child(CompatTool.COMPAT_DATA_DIR).get_child("force_compat").query_exists();
if(this is Sources.Steam.SteamGame) return false;
return install_dir != null && install_dir.get_child(CompatTool.COMPAT_DATA_DIR).get_child("force_compat").query_exists();
}
set
{
Expand Down
5 changes: 3 additions & 2 deletions src/data/sources/humble/Trove.vala
Original file line number Diff line number Diff line change
Expand Up @@ -188,9 +188,10 @@ namespace GameHub.Data.Sources.Humble
data["machine_name"] = machine_name;
data["filename"] = filename;

var signed = Parser.parse_remote_json_file(Trove.SIGN_URL, "POST", null, headers, data).get_object();
var signed_node = Parser.parse_remote_json_file(Trove.SIGN_URL, "POST", null, headers, data);
var signed = signed_node != null && signed_node.get_node_type() == Json.NodeType.OBJECT ? signed_node.get_object() : null;

return signed.has_member("signed_url") ? signed.get_string_member("signed_url") : null;
return signed != null && signed.has_member("signed_url") ? signed.get_string_member("signed_url") : null;
}
}
}

0 comments on commit 6263673

Please sign in to comment.