Skip to content

Commit 78a18c3

Browse files
PowerShellTeamSergei Vorobev
authored andcommitted
Revert "Update files from psl-monad"
This reverts commit 9ed2c2a. This commit is here to make source-depot branch a parent of master
1 parent 9ed2c2a commit 78a18c3

234 files changed

Lines changed: 2775 additions & 760 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/Microsoft.PowerShell.Commands.Management/commands/management/ClearRecycleBinCommand.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System;
1+
#if !CORECLR
2+
using System;
23
using System.Management.Automation;
34
using System.Runtime.InteropServices;
45
using System.IO;
@@ -251,4 +252,5 @@ internal enum RecycleFlags : uint
251252
[DllImport("Shell32.dll", CharSet = CharSet.Unicode)]
252253
internal static extern uint SHEmptyRecycleBin(IntPtr hwnd, string pszRootPath, RecycleFlags dwFlags);
253254
}
254-
}
255+
}
256+
#endif

src/Microsoft.PowerShell.Commands.Management/commands/management/CommitTransactionCommand.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if !CORECLR
12
/********************************************************************++
23
Copyright (c) Microsoft Corporation. All rights reserved.
34
--********************************************************************/
@@ -32,3 +33,5 @@ protected override void EndProcessing ()
3233

3334
} // namespace Microsoft.PowerShell.Commands
3435

36+
37+
#endif

src/Microsoft.PowerShell.Commands.Management/commands/management/Computer.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if !CORECLR
12
/********************************************************************++
23
Copyright (c) Microsoft Corporation. All rights reserved.
34
--********************************************************************/
@@ -7384,3 +7385,5 @@ internal enum TransportProtocol
73847385
#endregion
73857386

73867387
}//End namespace
7388+
7389+
#endif

src/Microsoft.PowerShell.Commands.Management/commands/management/Eventlog.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if !CORECLR
12
/********************************************************************++
23
Copyright (c) Microsoft Corporation. All rights reserved.
34
--********************************************************************/
@@ -1631,3 +1632,5 @@ protected override void BeginProcessing()
16311632

16321633
}//Microsoft.PowerShell.Commands
16331634

1635+
1636+
#endif

src/Microsoft.PowerShell.Commands.Management/commands/management/GetClipboardCommand.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
using System;
1+
#if !CORECLR
2+
using System;
23
using System.Management.Automation;
34
using System.Collections.Generic;
45
using System.Windows.Forms;
@@ -200,4 +201,5 @@ private PSObject WrapOutputInPSObject(
200201
return result;
201202
}
202203
}
203-
}
204+
}
205+
#endif

src/Microsoft.PowerShell.Commands.Management/commands/management/GetTransactionCommand.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if !CORECLR
12
/********************************************************************++
23
Copyright (c) Microsoft Corporation. All rights reserved.
34
--********************************************************************/
@@ -26,3 +27,5 @@ protected override void EndProcessing ()
2627

2728
} // namespace Microsoft.PowerShell.Commands
2829

30+
31+
#endif

src/Microsoft.PowerShell.Commands.Management/commands/management/GetWMIObjectCommand.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if !CORECLR
12
/********************************************************************++
23
Copyright (c) Microsoft Corporation. All rights reserved.
34
--********************************************************************/
@@ -468,3 +469,5 @@ private string GetClassNameFromQuery(string query)
468469

469470
} // namespace Microsoft.PowerShell.Commands
470471

472+
473+
#endif

src/Microsoft.PowerShell.Commands.Management/commands/management/Hotfix.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if !CORECLR
12
/********************************************************************++
23
Copyright (c) Microsoft Corporation. All rights reserved.
34
--********************************************************************/
@@ -276,3 +277,5 @@ public void Dispose(bool disposing)
276277
#endregion
277278

278279
}//Microsoft.Powershell.commands
280+
281+
#endif

src/Microsoft.PowerShell.Commands.Management/commands/management/InvokeWMIMethodCommand.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#if !CORECLR
12
//
23
// Copyright (C) Microsoft. All rights reserved.
34
//
@@ -298,3 +299,5 @@ private static object MakeBaseObjectArray(object argument)
298299
#endregion Command code
299300
}//InvokeWMIObject
300301
}
302+
303+
#endif

src/Microsoft.PowerShell.Commands.Management/commands/management/ParsePathCommand.cs

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -272,6 +272,7 @@ public SwitchParameter IsAbsolute
272272

273273
#region Command code
274274

275+
private static string volumeSeparatorCharAsString = System.IO.Path.VolumeSeparatorChar.ToString();
275276
/// <summary>
276277
/// Parses the specified path and returns the portion determined by the
277278
/// boolean parameters.
@@ -395,7 +396,7 @@ protected override void ProcessRecord ()
395396
continue;
396397

397398
case qualifierSet :
398-
int separatorIndex = pathsToParse[index].IndexOf(":", StringComparison.CurrentCulture);
399+
int separatorIndex = pathsToParse[index].IndexOf(volumeSeparatorCharAsString, StringComparison.CurrentCulture);
399400

400401
if (separatorIndex < 0)
401402
{
@@ -537,10 +538,15 @@ private string RemoveQualifier(string path)
537538

538539
string result = path;
539540

540-
if (SessionState.Path.IsProviderQualified(path))
541+
// Platform notes: On single root fileystems, there is no such thing
542+
// as a drive qualifier, and so this is a noop
543+
if (Platform.HasSingleRootFilesystem())
544+
{
545+
}
546+
else if (SessionState.Path.IsProviderQualified(path))
541547
{
542548
int index = path.IndexOf("::", StringComparison.CurrentCulture);
543-
549+
544550
if (index != -1)
545551
{
546552
// remove the qualifier
@@ -553,8 +559,8 @@ private string RemoveQualifier(string path)
553559

554560
if (SessionState.Path.IsPSAbsolute(path, out driveName))
555561
{
556-
// Remove the drive name and colon
557562

563+
// Remove the drive name and colon
558564
result = path.Substring(driveName.Length + 1);
559565
}
560566
}

0 commit comments

Comments
 (0)