This is an automated email from the ASF dual-hosted git repository.

nightowl888 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucenenet.git

commit a5a4aed22405305bab5bff47f1a767f1eccfaa9a
Author: Shad Storhaug <[email protected]>
AuthorDate: Fri Sep 11 11:34:40 2020 +0700

    Directory.Build.targets: Added FEATURE_MEMORYMAPPEDFILESECURITY and 
implemented throughout solution
---
 Directory.Build.targets               | 1 +
 src/Lucene.Net/Store/MMapDirectory.cs | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/Directory.Build.targets b/Directory.Build.targets
index 0cf8024..9d6d4af 100644
--- a/Directory.Build.targets
+++ b/Directory.Build.targets
@@ -102,6 +102,7 @@
 
     <DefineConstants>$(DefineConstants);NETFRAMEWORK</DefineConstants>
     <DefineConstants>$(DefineConstants);FEATURE_ARGITERATOR</DefineConstants>
+    
<DefineConstants>$(DefineConstants);FEATURE_MEMORYMAPPEDFILESECURITY</DefineConstants>
     
<DefineConstants>$(DefineConstants);FEATURE_SERIALIZABLE_EXCEPTIONS</DefineConstants>
     <!-- Although HostProtectionAttribute is available in .NET Standard 2.0+ 
via platform extensions, we are excluding
          it due to the fact it is not a primary feature of Lucene.NET -->
diff --git a/src/Lucene.Net/Store/MMapDirectory.cs 
b/src/Lucene.Net/Store/MMapDirectory.cs
index 3bd6f74..523e97e 100644
--- a/src/Lucene.Net/Store/MMapDirectory.cs
+++ b/src/Lucene.Net/Store/MMapDirectory.cs
@@ -311,7 +311,7 @@ namespace Lucene.Net.Store
                     mapName: null, 
                     capacity: length, 
                     access: MemoryMappedFileAccess.Read,
-#if !NETSTANDARD
+#if FEATURE_MEMORYMAPPEDFILESECURITY
                     memoryMappedFileSecurity: null,
 #endif
                     inheritability: HandleInheritability.Inheritable, 

Reply via email to