Skip to content

Commit 81c0096

Browse files
committed
Fix exception file check in hooking sample.
1 parent 1b20d26 commit 81c0096

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/samples/hooking/InjectedProgram.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ public static async Task<int> RunAsync(InjectedProgramContext context, ReadOnlyM
5959

6060
Console.WriteLine("Returned counter {0}.", counter);
6161

62-
if (File.Exists(tempFile))
62+
if (new FileInfo(tempFile).Length != 0)
6363
Console.WriteLine(await File.ReadAllTextAsync(tempFile));
6464

6565
return counter == 1 ? 0 : 1;

0 commit comments

Comments
 (0)