diff --git a/appveyor.yml b/appveyor.yml index 6d2d3675..f06ffbb8 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,4 +1,4 @@ -version: 0.16.0-{build}-{branch} +version: 0.16.1-{build}-{branch} pull_requests: do_not_increment_build_number: true diff --git a/meson.build b/meson.build index 5afbc855..1c0c12f7 100644 --- a/meson.build +++ b/meson.build @@ -1,4 +1,4 @@ -project('com.github.tkashkin.gamehub', 'vala', 'c', version: '0.16.0') +project('com.github.tkashkin.gamehub', 'vala', 'c', version: '0.16.1') i18n = import('i18n') gnome = import('gnome') diff --git a/src/data/sources/steam/Steam.vala b/src/data/sources/steam/Steam.vala index ce3b43c7..d7989620 100644 --- a/src/data/sources/steam/Steam.vala +++ b/src/data/sources/steam/Steam.vala @@ -444,19 +444,32 @@ namespace GameHub.Data.Sources.Steam if(libraryfolders == null || !libraryfolders.query_exists()) return folders; var root = Parser.parse_vdf_file(libraryfolders.get_path()); - var lf = Parser.json_object(root, {"LibraryFolders"}); + var lf = Parser.json_object(root, {"libraryfolders"}) ?? Parser.json_object(root, {"LibraryFolders"}); if(lf != null) { - foreach(var key in lf.get_members()) - { - var libdir = FSUtils.file(lf.get_string_member(key)); + lf.foreach_member((obj, key, node) => { + File? libdir = null; + + if(node.get_node_type() == Json.NodeType.VALUE) + { + libdir = FSUtils.file(node.get_string()); + } + else if(node.get_node_type() == Json.NodeType.OBJECT) + { + var libobj = node.get_object(); + if(libobj.has_member("path")) + { + libdir = FSUtils.file(libobj.get_string_member("path")); + } + } + if(libdir != null && libdir.query_exists()) { var dir = FSUtils.find_case_insensitive(libdir, "steamapps"); if(dir != null && dir.query_exists()) folders.add(dir.get_path()); } - } + }); } return folders;