lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [1/4] lucenenet git commit: fsync for directories on windows does not make sense
Date Tue, 06 Jan 2015 13:24:50 GMT
Repository: lucenenet
Updated Branches:
  refs/heads/master f09cd685e -> f7cc217ff


fsync for directories on windows does not make sense


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

Branch: refs/heads/master
Commit: 7b8256c61f195c73a9ef071a3ac30a40f148daac
Parents: 67f47ad
Author: Laimonas Simutis <laimis@gmail.com>
Authored: Sun Jan 4 21:59:02 2015 -0500
Committer: Laimonas Simutis <laimis@gmail.com>
Committed: Sun Jan 4 21:59:02 2015 -0500

----------------------------------------------------------------------
 src/Lucene.Net.Core/Util/IOUtils.cs | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/7b8256c6/src/Lucene.Net.Core/Util/IOUtils.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Core/Util/IOUtils.cs b/src/Lucene.Net.Core/Util/IOUtils.cs
index e23d3cd..581eb61 100644
--- a/src/Lucene.Net.Core/Util/IOUtils.cs
+++ b/src/Lucene.Net.Core/Util/IOUtils.cs
@@ -443,6 +443,12 @@ namespace Lucene.Net.Util
         ///  because not all file systems and operating systems allow to fsync on a directory)
</param>
         public static void Fsync(string fileToSync, bool isDir)
         {
+            // Fsync for folders appears to be "undefined" for Windows platform based on
the blog article in the comments below
+            if (isDir && Constants.WINDOWS)
+            {
+                return;
+            }
+
             var retryCount = 1;
             while (true)
             {


Mime
View raw message