Skip to content

Commit

Permalink
fix possible null
Browse files Browse the repository at this point in the history
  • Loading branch information
Barsonax committed Oct 20, 2023
1 parent 03f1d3b commit b31237a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Examples/Razor/Razor.Playwright/TestSetup/TestBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public async Task AfterTestCase()
{
await Page.Context.CloseAsync();
var path = await Page.Video!.PathAsync();
var folder = Path.GetDirectoryName(path);
var folder = Path.GetDirectoryName(path) ?? throw new InvalidOperationException($"Could not get folder for {path}");
var newName = Path.Combine(folder, $"{TestContext.CurrentContext.Test.FullName}.webm");
File.Move(path, newName, true);

Expand Down

0 comments on commit b31237a

Please sign in to comment.