lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [01/18] lucenenet git commit: We can use the CLR's Delete recursive
Date Tue, 06 Jan 2015 03:46:17 GMT
Repository: lucenenet
Updated Branches:
  refs/heads/master b18ae0aac -> f09cd685e


We can use the CLR's Delete recursive


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

Branch: refs/heads/master
Commit: 6b0841c45bd2d9c3afee42789337f3ec0882482a
Parents: b18ae0a
Author: Itamar Syn-Hershko <itamar@code972.com>
Authored: Mon Jan 5 14:45:54 2015 +0200
Committer: Itamar Syn-Hershko <itamar@code972.com>
Committed: Mon Jan 5 14:45:54 2015 +0200

----------------------------------------------------------------------
 src/Lucene.Net.Tests/core/Store/TestWindowsMMap.cs | 8 ++------
 1 file changed, 2 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/6b0841c4/src/Lucene.Net.Tests/core/Store/TestWindowsMMap.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests/core/Store/TestWindowsMMap.cs b/src/Lucene.Net.Tests/core/Store/TestWindowsMMap.cs
index 649d269..7425024 100644
--- a/src/Lucene.Net.Tests/core/Store/TestWindowsMMap.cs
+++ b/src/Lucene.Net.Tests/core/Store/TestWindowsMMap.cs
@@ -101,17 +101,13 @@ namespace Lucene.Net.Store
             RmDir(dirPath);
         }
 
-        private void RmDir(DirectoryInfo dir)
+        private static void RmDir(DirectoryInfo dir)
         {
             if (!dir.Exists)
             {
                 return;
             }
-            foreach (FileInfo file in dir.GetFiles())
-            {
-                file.Delete();
-            }
-            dir.Delete();
+            dir.Delete(true);
         }
     }
 }
\ No newline at end of file


Mime
View raw message