Skip to content

Commit

Permalink
Fix bug introduced in 'Fix copying a file onto itself logic for dotne…
Browse files Browse the repository at this point in the history
…t#77835'

• The source path should have used sourceFullPath rather than destPath
  • Loading branch information
hamarb123 committed Dec 6, 2022
1 parent 835fc2f commit 05f9d26
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static partial void CopyFile(string sourceFullPath, string destFullPath,
}

//Get the full path of the source path and verify that we're not copying the source file onto itself
string fullSource = TryGetLinkTarget(sourceFullPath, destPath, overwrite) ?? destPath;
string fullSource = TryGetLinkTarget(sourceFullPath, destPath, overwrite) ?? sourceFullPath;

//Start the file copy and prepare for finalization
StartedCopyFileState startedCopyFile = StartCopyFile(fullSource, destPath, overwrite, openDst: false);
Expand Down

0 comments on commit 05f9d26

Please sign in to comment.