diff --git a/src/libraries/Common/src/Interop/OSX/Interop.libc.cs b/src/libraries/Common/src/Interop/OSX/Interop.libc.cs index 76eba13f1d342..9b7722f36df47 100644 --- a/src/libraries/Common/src/Interop/OSX/Interop.libc.cs +++ b/src/libraries/Common/src/Interop/OSX/Interop.libc.cs @@ -11,13 +11,13 @@ internal static partial class libc [StructLayout(LayoutKind.Sequential)] internal struct AttrList { - [MarshalAs(UnmanagedType.U2)] public ushort bitmapCount; - [MarshalAs(UnmanagedType.U2)] public ushort reserved; - [MarshalAs(UnmanagedType.U4)] public uint commonAttr; - [MarshalAs(UnmanagedType.U4)] public uint volAttr; - [MarshalAs(UnmanagedType.U4)] public uint dirAttr; - [MarshalAs(UnmanagedType.U4)] public uint fileAttr; - [MarshalAs(UnmanagedType.U4)] public uint forkAttr; + public ushort bitmapCount; + public ushort reserved; + public uint commonAttr; + public uint volAttr; + public uint dirAttr; + public uint fileAttr; + public uint forkAttr; public const ushort ATTR_BIT_MAP_COUNT = 5; public const uint ATTR_CMN_CRTIME = 0x00000200; diff --git a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FileOperations.cs b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FileOperations.cs index f8bf953f4c68a..8a2724dc2eddf 100644 --- a/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FileOperations.cs +++ b/src/libraries/Common/src/Interop/Windows/Kernel32/Interop.FileOperations.cs @@ -19,7 +19,6 @@ internal partial class FileOperations internal const int FILE_FLAG_BACKUP_SEMANTICS = 0x02000000; internal const int FILE_FLAG_FIRST_PIPE_INSTANCE = 0x00080000; internal const int FILE_FLAG_OVERLAPPED = 0x40000000; - internal const int FILE_FLAG_OPEN_REPARSE_POINT = 0x00200000; internal const int FILE_LIST_DIRECTORY = 0x0001; } diff --git a/src/libraries/System.IO.FileSystem/src/System/IO/FileStatus.OSX.cs b/src/libraries/System.IO.FileSystem/src/System/IO/FileStatus.OSX.cs index 7084e5794712d..2dee15a9958bc 100644 --- a/src/libraries/System.IO.FileSystem/src/System/IO/FileStatus.OSX.cs +++ b/src/libraries/System.IO.FileSystem/src/System/IO/FileStatus.OSX.cs @@ -22,12 +22,7 @@ internal unsafe void SetCreationTime(string path, DateTimeOffset time) Interop.libc.AttrList attrList = default; attrList.bitmapCount = Interop.libc.AttrList.ATTR_BIT_MAP_COUNT; - attrList.reserved = 0; attrList.commonAttr = Interop.libc.AttrList.ATTR_CMN_CRTIME; - attrList.dirAttr = 0; - attrList.fileAttr = 0; - attrList.forkAttr = 0; - attrList.volAttr = 0; // Try to set the attribute on the file system entry using setattrlist, // otherwise fall back to the method used on other unix platforms as the diff --git a/src/libraries/System.IO.FileSystem/src/System/IO/FileSystem.Windows.cs b/src/libraries/System.IO.FileSystem/src/System/IO/FileSystem.Windows.cs index c83b8463ae7c5..5b5f9a86bc744 100644 --- a/src/libraries/System.IO.FileSystem/src/System/IO/FileSystem.Windows.cs +++ b/src/libraries/System.IO.FileSystem/src/System/IO/FileSystem.Windows.cs @@ -158,7 +158,7 @@ private static SafeFileHandle OpenHandle(string fullPath, bool asDirectory) Interop.Kernel32.GenericOperations.GENERIC_WRITE, FileShare.ReadWrite | FileShare.Delete, FileMode.Open, - (asDirectory ? Interop.Kernel32.FileOperations.FILE_FLAG_BACKUP_SEMANTICS : 0) | Interop.Kernel32.FileOperations.FILE_FLAG_OPEN_REPARSE_POINT); + asDirectory ? Interop.Kernel32.FileOperations.FILE_FLAG_BACKUP_SEMANTICS : 0); if (handle.IsInvalid) { diff --git a/src/libraries/System.IO.FileSystem/tests/Base/BaseGetSetTimes.cs b/src/libraries/System.IO.FileSystem/tests/Base/BaseGetSetTimes.cs index 5eec35a523b21..c51ed5edd7b7d 100644 --- a/src/libraries/System.IO.FileSystem/tests/Base/BaseGetSetTimes.cs +++ b/src/libraries/System.IO.FileSystem/tests/Base/BaseGetSetTimes.cs @@ -111,7 +111,7 @@ public void SettingUpdatesPropertiesAfterAnother() } [Fact] - [PlatformSpecific(~TestPlatforms.Browser)] + [PlatformSpecific(~(TestPlatforms.Browser | TestPlatforms.Windows))] public void SettingUpdatesPropertiesOnSymlink() { // This test makes sure that the times are set on the symlink itself.