lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nightowl...@apache.org
Subject [13/47] lucenenet git commit: Core.Store.FSDirectory: Added check to ensure deleted file was really deleted (similar to the way it works in Java).
Date Tue, 11 Oct 2016 18:34:58 GMT
Core.Store.FSDirectory: Added check to ensure deleted file was really deleted (similar to the
way it works in Java).


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

Branch: refs/heads/master
Commit: 2a4a92129063387234f333050ccf259eddb89a71
Parents: cef4d0d
Author: Shad Storhaug <shad@shadstorhaug.com>
Authored: Sat Oct 8 17:33:53 2016 +0700
Committer: Shad Storhaug <shad@shadstorhaug.com>
Committed: Tue Oct 11 00:26:19 2016 +0700

----------------------------------------------------------------------
 src/Lucene.Net.Core/Store/FSDirectory.cs | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/2a4a9212/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 1a60cdf..624c568 100644
--- a/src/Lucene.Net.Core/Store/FSDirectory.cs
+++ b/src/Lucene.Net.Core/Store/FSDirectory.cs
@@ -318,6 +318,10 @@ namespace Lucene.Net.Store
             try
             {
                 file.Delete();
+                if (File.Exists(file.FullName))
+                {
+                    throw new System.IO.IOException("Cannot delete " + file);
+                }
             }
             catch (Exception)
             {


Mime
View raw message