1 From: Jon Trowbridge <trow@novell.com>
3 Open the FileStream with FileShare.ReadWrite.
5 Index: Store/FSDirectory.cs
6 ===================================================================
7 RCS file: /cvs/gnome/beagle/beagled/Lucene.Net/Store/FSDirectory.cs,v
8 retrieving revision 1.19.2.16
9 diff -u -3 -p -r1.19.2.16 FSDirectory.cs
10 --- Store/FSDirectory.cs 30 Sep 2006 01:52:23 -0000 1.19.2.16
11 +++ Store/FSDirectory.cs 30 Sep 2006 01:53:32 -0000
12 @@ -601,7 +601,7 @@ namespace Lucene.Net.Store
15 in_Renamed = new System.IO.FileStream(old.FullName, System.IO.FileMode.Open, System.IO.FileAccess.Read);
16 - out_Renamed = new System.IO.FileStream(nu.FullName, System.IO.FileMode.Create);
17 + out_Renamed = new System.IO.FileStream(nu.FullName, System.IO.FileMode.Create, System.IO.FileAccess.Write, System.IO.FileShare.ReadWrite);
18 // see if the buffer needs to be initialized. Initialization is
19 // only done on-demand since many VM's will never run into the renameTo
20 // bug and hence shouldn't waste 1K of mem for no reason.