mirror of
https://github.com/oliverbooth/fdup.git
synced 2024-12-05 02:08:48 +00:00
fix: fix error resulting from concurrent access of hash map
This commit is contained in:
parent
64c23c888d
commit
0f40439f2e
@ -6,7 +6,7 @@
|
|||||||
<ImplicitUsings>enable</ImplicitUsings>
|
<ImplicitUsings>enable</ImplicitUsings>
|
||||||
<Nullable>enable</Nullable>
|
<Nullable>enable</Nullable>
|
||||||
<AssemblyName>fdup</AssemblyName>
|
<AssemblyName>fdup</AssemblyName>
|
||||||
<VersionPrefix>1.0.0</VersionPrefix>
|
<VersionPrefix>1.0.1</VersionPrefix>
|
||||||
<Authors>Oliver Booth</Authors>
|
<Authors>Oliver Booth</Authors>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
using System.Diagnostics;
|
using System.Collections.Concurrent;
|
||||||
|
using System.Diagnostics;
|
||||||
using System.Security.Cryptography;
|
using System.Security.Cryptography;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using Spectre.Console;
|
using Spectre.Console;
|
||||||
@ -8,7 +9,7 @@ namespace FindDuplicates;
|
|||||||
|
|
||||||
internal sealed class ListCommand : AsyncCommand<ListSettings>
|
internal sealed class ListCommand : AsyncCommand<ListSettings>
|
||||||
{
|
{
|
||||||
private readonly Dictionary<string, List<FileInfo>> _fileHashMap = new();
|
private readonly ConcurrentDictionary<string, List<FileInfo>> _fileHashMap = new();
|
||||||
|
|
||||||
public override async Task<int> ExecuteAsync(CommandContext context, ListSettings settings)
|
public override async Task<int> ExecuteAsync(CommandContext context, ListSettings settings)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user