Skip to content

Commit 41ee8fe

Browse files
committed
fix build
1 parent e28aa76 commit 41ee8fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libraries/System.Private.CoreLib/src/System/IO/FileSystem.Windows.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ public static void MoveFile(string sourceFullPath, string destFullPath, bool ove
147147

148148
private static SafeFileHandle OpenHandleToWriteAttributes(string fullPath, bool asDirectory)
149149
{
150-
if (fullPath.Length == PathInternal.GetRootLength(fullPath) && fullPath[1] == Path.VolumeSeparatorChar)
150+
if (fullPath.Length == PathInternal.GetRootLength(fullPath.AsSpan()) && fullPath[1] == Path.VolumeSeparatorChar)
151151
{
152152
// intentionally not fullpath, most upstack public APIs expose this as path.
153153
throw new ArgumentException(SR.Arg_PathIsVolume, "path");

0 commit comments

Comments
 (0)