From 71f5df3e66a6213f58b1536175f6deb4e0b373f4 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 9 Mar 2026 20:38:43 +0000 Subject: [PATCH 1/2] Initial plan From 43d52f5d604937a74e184262dc4c1b1ad46896e7 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 9 Mar 2026 20:46:46 +0000 Subject: [PATCH 2/2] Fix Directory_Delete_MountVolume test: guard Unmount calls with Directory.Exists check Co-authored-by: jozkee <16040868+jozkee@users.noreply.github.com> --- .../Directory/Delete_MountVolume.cs | 28 +++++++++++++------ 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/Directory/Delete_MountVolume.cs b/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/Directory/Delete_MountVolume.cs index f4b153d94d9326..ed74831de984f6 100644 --- a/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/Directory/Delete_MountVolume.cs +++ b/src/libraries/System.Runtime/tests/System.IO.FileSystem.Tests/Directory/Delete_MountVolume.cs @@ -79,8 +79,11 @@ public static void RunTest() } finally { - MountHelper.Unmount(mountedDirName); - DeleteDir(mountedDirName, true); + if (Directory.Exists(mountedDirName)) + { + MountHelper.Unmount(mountedDirName); + DeleteDir(mountedDirName, true); + } } File.AppendAllText(debugFileName, string.Format("Completed scenario {0}", Environment.NewLine)); } @@ -124,8 +127,11 @@ public static void RunTest() } finally { - MountHelper.Unmount(mountedDirName); - DeleteDir(mountedDirName, true); + if (Directory.Exists(mountedDirName)) + { + MountHelper.Unmount(mountedDirName); + DeleteDir(mountedDirName, true); + } } File.AppendAllText(debugFileName, string.Format("Completed scenario {0}", Environment.NewLine)); } @@ -166,8 +172,11 @@ public static void RunTest() } finally { - MountHelper.Unmount(mountedDirName); - DeleteDir(mountedDirName, true); + if (Directory.Exists(mountedDirName)) + { + MountHelper.Unmount(mountedDirName); + DeleteDir(mountedDirName, true); + } } File.AppendAllText(debugFileName, string.Format("Completed scenario {0}", Environment.NewLine)); } @@ -208,8 +217,11 @@ public static void RunTest() } finally { - MountHelper.Unmount(mountedDirName); - DeleteDir(mountedDirName, true); + if (Directory.Exists(mountedDirName)) + { + MountHelper.Unmount(mountedDirName); + DeleteDir(mountedDirName, true); + } } File.AppendAllText(debugFileName, string.Format("Completed scenario {0}", Environment.NewLine)); }