This repository was archived by the owner on Jan 23, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed
src/System.Runtime.Extensions/src/System/IO Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change 1
1
// Copyright (c) Microsoft. All rights reserved.
2
2
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3
3
4
- using System ;
5
- using System . Collections ;
6
- using System . Text ;
4
+ using System . Diagnostics . Contracts ;
7
5
using System . Runtime . InteropServices ;
8
- using System . Runtime . CompilerServices ;
9
- using System . Globalization ;
10
- using System . Runtime . Versioning ;
11
6
using System . Security ;
12
- using System . Diagnostics . Contracts ;
13
- using System . Diagnostics ;
7
+ using System . Text ;
14
8
15
9
namespace System . IO
16
10
{
@@ -279,7 +273,7 @@ internal unsafe bool TryExpandShortFileName()
279
273
280
274
// We do not need to call GetLongPathName if we know it will fail becasue the path does not exist:
281
275
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 )
283
277
doNotTryExpandShortFileName = true ;
284
278
285
279
return false ;
@@ -321,7 +315,7 @@ internal unsafe bool TryExpandShortFileName()
321
315
322
316
// We do not need to call GetLongPathName if we know it will fail becasue the path does not exist:
323
317
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 )
325
319
doNotTryExpandShortFileName = true ;
326
320
327
321
sb . Length = 0 ;
You can’t perform that action at this time.
0 commit comments