[Unison-hackers] [unison-svn] r430 - trunk/src

vouillon@seas.upenn.edu vouillon at seas.upenn.edu
Mon Apr 12 06:45:50 EDT 2010


Author: vouillon
Date: 2010-04-12 06:45:50 -0400 (Mon, 12 Apr 2010)
New Revision: 430

Modified:
   trunk/src/RECENTNEWS
   trunk/src/fspath.ml
   trunk/src/mkProjectInfo.ml
Log:
* Fixed bug in finding a different fspath suffix when a root path is a
  suffix of the other (for instance: /foo and /archive/foo).


Modified: trunk/src/RECENTNEWS
===================================================================
--- trunk/src/RECENTNEWS	2010-04-12 09:40:14 UTC (rev 429)
+++ trunk/src/RECENTNEWS	2010-04-12 10:45:50 UTC (rev 430)
@@ -1,5 +1,11 @@
 CHANGES FROM VERSION 2.40.16
 
+* Fixed bug in finding a different fspath suffix when a root path is a
+  suffix of the other (for instance: /foo and /archive/foo).
+
+-------------------------------
+CHANGES FROM VERSION 2.40.16
+
 * Compare filenames up to decomposition in case sensitive mode when
   one host is running MacOSX and the unicode preference is set to
   true.

Modified: trunk/src/fspath.ml
===================================================================
--- trunk/src/fspath.ml	2010-04-12 09:40:14 UTC (rev 429)
+++ trunk/src/fspath.ml	2010-04-12 10:45:50 UTC (rev 430)
@@ -65,14 +65,15 @@
       (* differ                                                              *)
       let rec loop n =
         let i1 = len1-n in
-        if i1<0 then n+1 else
+        if i1<0 then n else
         let i2 = len2-n in
-        if i2<0 then n+1 else
+        if i2<0 then n else
         if compare (String.get f1 i1) (String.get f2 i2) = 0
         then loop (n+1)
         else n in
       loop 1 in
     let suffix f len =
+      if n > len then f else
       try
         let n' = String.rindex_from f (len-n) '/' in
         String.sub f (n'+1) (len-n'-1)

Modified: trunk/src/mkProjectInfo.ml
===================================================================
--- trunk/src/mkProjectInfo.ml	2010-04-12 09:40:14 UTC (rev 429)
+++ trunk/src/mkProjectInfo.ml	2010-04-12 10:45:50 UTC (rev 430)
@@ -110,3 +110,4 @@
 
 
 
+



More information about the Unison-hackers mailing list