diff --git a/Duplicati/Library/Main/Operation/FilelistProcessor.cs b/Duplicati/Library/Main/Operation/FilelistProcessor.cs index bac0e3a3c..f4f5af5bb 100644 --- a/Duplicati/Library/Main/Operation/FilelistProcessor.cs +++ b/Duplicati/Library/Main/Operation/FilelistProcessor.cs @@ -101,19 +101,17 @@ namespace Duplicati.Library.Main.Operation throw new Duplicati.Library.Interface.UserInformationException(s); } - var lookup = new Dictionary(); - var doubles = new Dictionary(); + var lookup = new HashSet(); + var doubles = new HashSet(); foreach(var v in tp.ParsedVolumes) { - if (lookup.ContainsKey(v.File.Name)) - doubles[v.File.Name] = null; - else - lookup[v.File.Name] = null; + if (!lookup.Add(v.File.Name)) + doubles.Add(v.File.Name); } if (doubles.Count > 0) { - var s = string.Format("Found remote files reported as duplicates, either the backend module is broken or you need to manually remove the extra copies.\nThe following files were found multiple times: {0}", string.Join(", ", doubles.Keys)); + var s = string.Format("Found remote files reported as duplicates, either the backend module is broken or you need to manually remove the extra copies.\nThe following files were found multiple times: {0}", string.Join(", ", doubles)); log.AddError(s, null); throw new Duplicati.Library.Interface.UserInformationException(s); }