Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 0 additions & 26 deletions src/System.Management.Automation/namespaces/FileSystemProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7984,18 +7984,6 @@ private struct REPARSE_DATA_BUFFER_MOUNTPOINT
public byte[] PathBuffer;
}

[StructLayout(LayoutKind.Sequential)]
private struct REPARSE_DATA_BUFFER_APPEXECLINK
{
public uint ReparseTag;
public ushort ReparseDataLength;
public ushort Reserved;
public uint StringCount;

[MarshalAs(UnmanagedType.ByValArray, SizeConst = 0x3FF0)]
public byte[] StringList;
}

[StructLayout(LayoutKind.Sequential)]
private struct BY_HANDLE_FILE_INFORMATION
{
Expand Down Expand Up @@ -8224,10 +8212,6 @@ private static string WinInternalGetLinkType(string filePath)
linkType = "Junction";
break;

case IO_REPARSE_TAG_APPEXECLINK:
linkType = "AppExeCLink";
break;

default:
linkType = null;
break;
Expand Down Expand Up @@ -8506,16 +8490,6 @@ private static string WinInternalGetTarget(SafeFileHandle handle)
targetDir = Encoding.Unicode.GetString(reparseMountPointDataBuffer.PathBuffer, reparseMountPointDataBuffer.SubstituteNameOffset, reparseMountPointDataBuffer.SubstituteNameLength);
break;

case IO_REPARSE_TAG_APPEXECLINK:
REPARSE_DATA_BUFFER_APPEXECLINK reparseAppExeDataBuffer = Marshal.PtrToStructure<REPARSE_DATA_BUFFER_APPEXECLINK>(outBuffer);
// The target file is at index 2
if (reparseAppExeDataBuffer.StringCount >= 3)
{
string temp = Encoding.Unicode.GetString(reparseAppExeDataBuffer.StringList);
targetDir = temp.Split('\0')[2];
}
break;

default:
return null;
}
Expand Down