Skip to content

Commit 982d595

Browse files
authored
Merge pull request #157 from Nutzzz/steam-empty-manifest
Add check for empty Steam manifest file
2 parents 9c64e82 + 6278024 commit 982d595

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/GameFinder.StoreHandlers.Steam/Services/Parsers/AppManifestParser.cs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@ public static Result<AppManifest> ParseManifestFile(AbsolutePath manifestPath)
3737
{
3838
using var stream = manifestPath.Read();
3939

40+
if (stream.Length == 0)
41+
{
42+
return Result.Fail(
43+
new Error("Manifest file is empty!")
44+
.WithMetadata("Path", manifestPath.GetFullPath())
45+
);
46+
}
47+
4048
var kv = KVSerializer.Create(KVSerializationFormat.KeyValues1Text);
4149
var appState = kv.Deserialize(stream, KVSerializerOptions.DefaultOptions);
4250

0 commit comments

Comments
 (0)