mirror of
https://github.com/Sonarr/Sonarr
synced 2025-12-15 21:03:56 +01:00
Update src/NzbDrone.Common.Test/DiskTests/DiskTransferServiceFixture.cs
Co-authored-by: Mark McDowall <mark@mcdowall.ca>
This commit is contained in:
parent
854d8b3b67
commit
ad104a49e8
1 changed files with 2 additions and 7 deletions
|
|
@ -586,17 +586,12 @@ public void TransferFile_should_find_files_with_multiple_slashes_within_their_pa
|
|||
|
||||
var root = GetFilledTempFolder();
|
||||
var rootDir = root.FullName;
|
||||
var fromFileName = "source-file";
|
||||
var from = Path.Combine(rootDir, fromFileName);
|
||||
var from = rootDir + Path.DirectorySeparatorChar + Path.DirectorySeparatorChar + "source-file";
|
||||
var to = Path.Combine(rootDir, "destination-file");
|
||||
|
||||
var oneSlash = new string(Path.DirectorySeparatorChar, 1);
|
||||
var threeSlashes = new string(Path.DirectorySeparatorChar, 3);
|
||||
var overSlashed = Path.Combine(rootDir.Replace(oneSlash, threeSlashes), fromFileName);
|
||||
|
||||
File.WriteAllText(from, "Source file");
|
||||
|
||||
var mode = Subject.TransferFile(overSlashed, to, TransferMode.Copy);
|
||||
var mode = Subject.TransferFile(from, to, TransferMode.Copy);
|
||||
mode.Should().Be(TransferMode.Copy);
|
||||
|
||||
ExceptionVerification.ExpectedWarns(1);
|
||||
|
|
|
|||
Loading…
Reference in a new issue