lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [1/3] lucenenet git commit: open with read/write sharing instead of read
Date Sat, 02 May 2015 17:37:23 GMT
Repository: lucenenet
Updated Branches:
  refs/heads/master 27be98ab3 -> ef7a7ad88


open with read/write sharing instead of read


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/19f506cd
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/19f506cd
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/19f506cd

Branch: refs/heads/master
Commit: 19f506cd6a2fe4c84f4b1df2d51e48e24757c11c
Parents: 27be98a
Author: Laimonas Simutis <laimis@gmail.com>
Authored: Fri May 1 20:28:28 2015 -0400
Committer: Laimonas Simutis <laimis@gmail.com>
Committed: Fri May 1 20:28:28 2015 -0400

----------------------------------------------------------------------
 src/Lucene.Net.Core/Store/FSDirectory.cs       | 2 +-
 src/Lucene.Net.Core/Store/SimpleFSDirectory.cs | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/19f506cd/src/Lucene.Net.Core/Store/FSDirectory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Store/FSDirectory.cs b/src/Lucene.Net.Core/Store/FSDirectory.cs
index 660cc4e..1a60cdf 100644
--- a/src/Lucene.Net.Core/Store/FSDirectory.cs
+++ b/src/Lucene.Net.Core/Store/FSDirectory.cs
@@ -477,7 +477,7 @@ namespace Lucene.Net.Store
             {
                 this.Parent = parent;
                 this.Name = name;
-                File = new FileStream(Path.Combine(parent.directory.FullName, name), FileMode.OpenOrCreate,
FileAccess.ReadWrite, FileShare.Read);
+                File = new FileStream(Path.Combine(parent.directory.FullName, name), FileMode.OpenOrCreate,
FileAccess.ReadWrite, FileShare.ReadWrite);
                 IsOpen = true;
             }
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/19f506cd/src/Lucene.Net.Core/Store/SimpleFSDirectory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Store/SimpleFSDirectory.cs b/src/Lucene.Net.Core/Store/SimpleFSDirectory.cs
index 186913d..e18a3bd 100644
--- a/src/Lucene.Net.Core/Store/SimpleFSDirectory.cs
+++ b/src/Lucene.Net.Core/Store/SimpleFSDirectory.cs
@@ -59,7 +59,7 @@ namespace Lucene.Net.Store
         {
             EnsureOpen();
             var path = new FileInfo(Path.Combine(Directory.FullName, name));
-            var raf = new FileStream(path.FullName, FileMode.Open, FileAccess.Read, FileShare.Read);
+            var raf = new FileStream(path.FullName, FileMode.Open, FileAccess.Read, FileShare.ReadWrite);
             return new SimpleFSIndexInput("SimpleFSIndexInput(path=\"" + path.FullName +
"\")", raf, context);
         }
 
@@ -67,7 +67,7 @@ namespace Lucene.Net.Store
         {
             EnsureOpen();
             var file = new FileInfo(Path.Combine(Directory.FullName, name));
-            var descriptor = new FileStream(file.FullName, FileMode.Open, FileAccess.Read,
FileShare.Read);
+            var descriptor = new FileStream(file.FullName, FileMode.Open, FileAccess.Read,
FileShare.ReadWrite);
             return new IndexInputSlicerAnonymousInnerClassHelper(this, context, file, descriptor);
         }
 


Mime
View raw message