mirror of
https://github.com/Radarr/Radarr.git
synced 2026-04-19 21:46:50 -04:00
Moving file from same source/destination no longer just deletes the file.
This commit is contained in:
@@ -48,6 +48,20 @@ namespace NzbDrone.Common.Test
|
||||
File.Exists(targetPath).Should().BeTrue();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void moveFile_should_not_move_overwrite_itself()
|
||||
{
|
||||
var diskProvider = new DiskProvider();
|
||||
diskProvider.CopyDirectory(BinFolder.FullName, BinFolderCopy.FullName);
|
||||
|
||||
var targetPath = BinFolderCopy.GetFiles("*.dll", SearchOption.AllDirectories).First().FullName;
|
||||
|
||||
diskProvider.MoveFile(targetPath, targetPath);
|
||||
|
||||
File.Exists(targetPath).Should().BeTrue();
|
||||
ExceptionVerification.ExcpectedWarns(1);
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void CopyFolder_should_copy_folder()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user