Skip to content

Commit

Permalink
Merge pull request #157 from Nutzzz/steam-empty-manifest
Browse files Browse the repository at this point in the history
Add check for empty Steam manifest file
  • Loading branch information
erri120 authored Oct 23, 2024
2 parents 9c64e82 + 6278024 commit 982d595
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,14 @@ public static Result<AppManifest> ParseManifestFile(AbsolutePath manifestPath)
{
using var stream = manifestPath.Read();

if (stream.Length == 0)
{
return Result.Fail(
new Error("Manifest file is empty!")
.WithMetadata("Path", manifestPath.GetFullPath())
);
}

var kv = KVSerializer.Create(KVSerializationFormat.KeyValues1Text);
var appState = kv.Deserialize(stream, KVSerializerOptions.DefaultOptions);

Expand Down

0 comments on commit 982d595

Please sign in to comment.