Fixed a duplication bug in the Snapshot Merge function.

This commit is contained in:
Admin
2020-12-06 17:08:38 -06:00
parent d758e42afb
commit 9f9fdac66a
3 changed files with 17 additions and 16 deletions
+1 -3
View File
@@ -171,13 +171,11 @@ namespace DataOrganizer
var snapShot = new Snapshot(files, folderGroup);
ActiveSnapshotForPrimaryTree.MergeSnapshot(snapShot);
var newFiles = snapShot.Files.Values.Except(ActiveSnapshotForPrimaryTree.Files.Values);
var existingFiles = ActiveSnapshotForPrimaryTree.Files.Values.Except(snapShot.Files.Values);
var newFilesCount = 0;
var modifiedFilesCount = 0;
var deletedFilesCount = 0;
foreach(var f in newFiles)
foreach(var f in ActiveSnapshotForPrimaryTree.Files.Values.Where(x => x.Status == FileSnapshot.FileStatus.PendingInsert))//newFiles)
{
var newNode = new TreeNode(f.Name) { Name = f.FullPath, BackColor = Color.LightBlue, ToolTipText = "New File Found!" };
var folders = ProcessFileFolders(f);