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

Commit 9994e6c

Browse files
committed
Checking in missed renamed file from last check-in
[tfs-changeset: 1497164]
1 parent bcc6edf commit 9994e6c

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

src/System.Runtime.Extensions/src/System/IO/PathHelper.Windows.cs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,10 @@
11
// Copyright (c) Microsoft. All rights reserved.
22
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
33

4-
using System;
5-
using System.Collections;
6-
using System.Text;
4+
using System.Diagnostics.Contracts;
75
using System.Runtime.InteropServices;
8-
using System.Runtime.CompilerServices;
9-
using System.Globalization;
10-
using System.Runtime.Versioning;
116
using System.Security;
12-
using System.Diagnostics.Contracts;
13-
using System.Diagnostics;
7+
using System.Text;
148

159
namespace System.IO
1610
{
@@ -279,7 +273,7 @@ internal unsafe bool TryExpandShortFileName()
279273

280274
// We do not need to call GetLongPathName if we know it will fail becasue the path does not exist:
281275
int lastErr = Marshal.GetLastWin32Error();
282-
if (lastErr == (int)Interop.ERROR_FILE_NOT_FOUND || lastErr == (int)Interop.ERROR_PATH_NOT_FOUND)
276+
if (lastErr == Interop.mincore.Errors.ERROR_FILE_NOT_FOUND || lastErr == Interop.mincore.Errors.ERROR_PATH_NOT_FOUND)
283277
doNotTryExpandShortFileName = true;
284278

285279
return false;
@@ -321,7 +315,7 @@ internal unsafe bool TryExpandShortFileName()
321315

322316
// We do not need to call GetLongPathName if we know it will fail becasue the path does not exist:
323317
int lastErr = Marshal.GetLastWin32Error();
324-
if ((int)Interop.ERROR_FILE_NOT_FOUND == lastErr || (int)Interop.ERROR_PATH_NOT_FOUND == lastErr)
318+
if (Interop.mincore.Errors.ERROR_FILE_NOT_FOUND == lastErr || Interop.mincore.Errors.ERROR_PATH_NOT_FOUND == lastErr)
325319
doNotTryExpandShortFileName = true;
326320

327321
sb.Length = 0;

0 commit comments

Comments
 (0)