Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit 9c55364

Browse files
author
Ian Hays
committed
Merge pull request #2794 from ianhays/FSTempdir
Fixed test that was leaving temp directories in root folder
2 parents 2ef7a72 + bd2d87d commit 9c55364

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

src/System.IO.FileSystem/tests/Directory/CreateDirectory.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,6 @@ public void DirectoryLongerThanMaxDirectoryAsPath_ThrowsPathTooLongException()
238238
Assert.All(paths, (path) =>
239239
{
240240
Assert.Throws<PathTooLongException>(() => Create(path));
241-
Directory.Delete(Path.Combine(Path.GetPathRoot(Directory.GetCurrentDirectory()), path.Split(Path.DirectorySeparatorChar)[1]), true);
242241
});
243242
}
244243

src/System.IO.FileSystem/tests/PortedCommon/IOServices.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public static string GetNonNtfsDriveOtherThan(string drive)
9595

9696
public static PathInfo GetPath(int characterCount, bool extended = false)
9797
{
98-
string root = Path.GetPathRoot(Directory.GetCurrentDirectory());
98+
string root = Path.GetTempPath();
9999
if (extended)
100100
root = IOInputs.ExtendedPrefix + root;
101101
return GetPath(root, characterCount);

0 commit comments

Comments
 (0)