Skip to content

Commit 79843c1

Browse files
authored
Fix File Locking when checking Executable status (#480)
* Fix checking executable write locking files (#479)
1 parent 0e04924 commit 79843c1

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Cli/Cli.csproj

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@
6060
<LaunchBrowser></LaunchBrowser>
6161
</PropertyGroup>
6262

63+
<PropertyGroup Condition=" '$(RunConfiguration)' == 'Gui' ">
64+
<StartAction>Project</StartAction>
65+
<LaunchBrowser></LaunchBrowser>
66+
</PropertyGroup>
6367
<ItemGroup>
6468
<PackageReference Include="CommandLineParser" Version="2.8.0" />
6569
<PackageReference Include="Microsoft.ApplicationInsights.AspNetCore" Version="2.14.0" />

Lib/Collectors/FileSystemUtils.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ e is ArgumentException
189189

190190
public static EXECUTABLE_TYPE GetExecutableType(string Path)
191191
{
192-
using var fs = new FileStream(Path, FileMode.Open);
192+
using var fs = new FileStream(Path, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
193193
return GetExecutableType(Path, fs);
194194
}
195195

0 commit comments

Comments
 (0)