Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,8 @@ public override void UpdateItem(EntryUpdateInfo updateInfo, SyncEntryChangedFlag
else if (updateInfo.Entry.Type == SyncEntryType.Directory)
{
Pre.Assert(!string.IsNullOrEmpty(newFullPath), "newFullPath != null");
Directory.Move(fullPath, newFullPath);
if (fullPath != newFullPath)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would be better written as string.equals.

Suggested change
if (fullPath != newFullPath)
if (!string.Equals(fullPath, newFullPath))

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that would be better.

Directory.Move(fullPath, newFullPath);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add curly braces here? (common coding style)

}
else
{
Expand Down Expand Up @@ -680,4 +681,4 @@ public void Dispose()
this.fileSystemWatcher?.Dispose();
}
}
}
}