Fixed: NET Core not deleting source when moving across drives

This reverts commit 10fc0b071f.  Use the
mono fix from 43a35c8447 in NET Core also
This commit is contained in:
ta264
2020-05-14 21:01:23 +01:00
committed by Qstick
parent 5c9b85972d
commit d03a6486d3
3 changed files with 11 additions and 35 deletions
@@ -81,23 +81,6 @@ namespace NzbDrone.Common.Test.DiskTests
File.Exists(destination).Should().BeTrue();
}
[Test]
[Retry(5)]
public void MoveFile_should_not_overwrite_existing_file()
{
var source1 = GetTempFilePath();
var source2 = GetTempFilePath();
var destination = GetTempFilePath();
File.WriteAllText(source1, "SourceFile1");
File.WriteAllText(source2, "SourceFile2");
Subject.MoveFile(source1, destination);
Assert.Throws<IOException>(() => Subject.MoveFile(source2, destination, false));
File.ReadAllText(destination).Should().Be("SourceFile1");
}
[Test]
public void MoveFile_should_not_move_overwrite_itself()
{