You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by di...@apache.org on 2008/11/18 19:05:31 UTC

svn commit: r718668 - in /incubator/lucene.net/trunk/C#/src/Lucene.Net: Index/SegmentInfos.cs Store/FSDirectory.cs

Author: digy
Date: Tue Nov 18 10:05:31 2008
New Revision: 718668

URL: http://svn.apache.org/viewvc?rev=718668&view=rev
Log:
LUCENENET-163 (Platform dependent path handling)

Modified:
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/SegmentInfos.cs
    incubator/lucene.net/trunk/C#/src/Lucene.Net/Store/FSDirectory.cs

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/SegmentInfos.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Index/SegmentInfos.cs?rev=718668&r1=718667&r2=718668&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/SegmentInfos.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Index/SegmentInfos.cs Tue Nov 18 10:05:31 2008
@@ -786,10 +786,10 @@
 							else
 							{
 								bool tmpBool;
-								if (System.IO.File.Exists(new System.IO.FileInfo(fileDirectory.FullName + "\\" + prevSegmentFileName).FullName))
+                                if (System.IO.File.Exists(new System.IO.FileInfo(fileDirectory.FullName + System.IO.Path.DirectorySeparatorChar + prevSegmentFileName).FullName))
 									tmpBool = true;
 								else
-									tmpBool = System.IO.Directory.Exists(new System.IO.FileInfo(fileDirectory.FullName + "\\" + prevSegmentFileName).FullName);
+                                    tmpBool = System.IO.Directory.Exists(new System.IO.FileInfo(fileDirectory.FullName + System.IO.Path.DirectorySeparatorChar + prevSegmentFileName).FullName);
 								prevExists = tmpBool;
 							}
 							

Modified: incubator/lucene.net/trunk/C#/src/Lucene.Net/Store/FSDirectory.cs
URL: http://svn.apache.org/viewvc/incubator/lucene.net/trunk/C%23/src/Lucene.Net/Store/FSDirectory.cs?rev=718668&r1=718667&r2=718668&view=diff
==============================================================================
--- incubator/lucene.net/trunk/C#/src/Lucene.Net/Store/FSDirectory.cs (original)
+++ incubator/lucene.net/trunk/C#/src/Lucene.Net/Store/FSDirectory.cs Tue Nov 18 10:05:31 2008
@@ -614,7 +614,7 @@
 		// Inherit javadoc
 		public override IndexInput OpenInput(System.String name, int bufferSize)
 		{
-			return new FSIndexInput(new System.IO.FileInfo(directory.FullName + "\\" + name), bufferSize);
+            return new FSIndexInput(new System.IO.FileInfo(directory.FullName + System.IO.Path.DirectorySeparatorChar + name), bufferSize);
 		}
 		
 		/// <summary> So we can do some byte-to-hexchar conversion below</summary>