lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ccurr...@apache.org
Subject svn commit: r1353649 - /incubator/lucene.net/trunk/src/core/Store/NativeFSLockFactory.cs
Date Mon, 25 Jun 2012 16:48:56 GMT
Author: ccurrens
Date: Mon Jun 25 16:48:55 2012
New Revision: 1353649

URL: http://svn.apache.org/viewvc?rev=1353649&view=rev
Log:
[LUCENENET-484] - Missed a patch from Luc Vanlerberghe for NativeFSLockFactory

Modified:
    incubator/lucene.net/trunk/src/core/Store/NativeFSLockFactory.cs

Modified: incubator/lucene.net/trunk/src/core/Store/NativeFSLockFactory.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/src/core/Store/NativeFSLockFactory.cs?rev=1353649&r1=1353648&r2=1353649&view=diff
==============================================================================
--- incubator/lucene.net/trunk/src/core/Store/NativeFSLockFactory.cs (original)
+++ incubator/lucene.net/trunk/src/core/Store/NativeFSLockFactory.cs Mon Jun 25 16:48:55 2012
@@ -248,6 +248,16 @@ namespace Lucene.Net.Store
                         failureReason = e;
                         f = null;
                     }
+                    // lucene.net: UnauthorizedAccessException does not derive from IOException
like in java
+                    catch (System.UnauthorizedAccessException e)
+                    {
+                        // On Windows, we can get intermittent "Access
+                        // Denied" here.  So, we treat this as failure to
+                        // acquire the lock, but, store the reason in case
+                        // there is in fact a real error case.
+                        failureReason = e;
+                        f = null;
+                    }
                     
                     if (f != null)
                     {
@@ -273,6 +283,16 @@ namespace Lucene.Net.Store
                                 // if it fails to get the lock.
                                 failureReason = e;
                             }
+                            // lucene.net: UnauthorizedAccessException does not derive from
IOException like in java
+                            catch (System.UnauthorizedAccessException e)
+                            {
+                                // On Windows, we can get intermittent "Access
+                                // Denied" here.  So, we treat this as failure to
+                                // acquire the lock, but, store the reason in case
+                                // there is in fact a real error case.
+                                failureReason = e;
+                                f = null;
+                            }
                             finally
                             {
                                 if (lock_Renamed == false)



Mime
View raw message