Author: mkrueger
Date: 2007-10-16 05:28:35 -0400 (Tue, 16 Oct 2007)
New Revision: 87562

Modified:
   trunk/monodevelop/Core/src/MonoDevelop.Core/ChangeLog
   trunk/monodevelop/Core/src/MonoDevelop.Core/MonoDevelop.Core/FileService.cs
Log:
* MonoDevelop.Core/FileService.cs: Found a better solution for the "."
  case in abs2rel path.

Modified: trunk/monodevelop/Core/src/MonoDevelop.Core/ChangeLog
===================================================================
--- trunk/monodevelop/Core/src/MonoDevelop.Core/ChangeLog       2007-10-16 
09:12:08 UTC (rev 87561)
+++ trunk/monodevelop/Core/src/MonoDevelop.Core/ChangeLog       2007-10-16 
09:28:35 UTC (rev 87562)
@@ -1,3 +1,8 @@
+2007-10-16  Mike Krüger <[EMAIL PROTECTED]> 
+
+       * MonoDevelop.Core/FileService.cs: Found a better solution for the "." 
case
+         in abs2rel path.
+
 2007-10-15  Mike Krüger <[EMAIL PROTECTED]> 
 
        * MonoDevelop.Core/FileService.cs: AbsoluteToRelativePath gives back . 
if

Modified: 
trunk/monodevelop/Core/src/MonoDevelop.Core/MonoDevelop.Core/FileService.cs
===================================================================
--- trunk/monodevelop/Core/src/MonoDevelop.Core/MonoDevelop.Core/FileService.cs 
2007-10-16 09:12:08 UTC (rev 87561)
+++ trunk/monodevelop/Core/src/MonoDevelop.Core/MonoDevelop.Core/FileService.cs 
2007-10-16 09:28:35 UTC (rev 87562)
@@ -259,13 +259,14 @@
                        
                        for (int i = indx; i < bPath.Length; i++) {
                                result.Append ("..");
-                               result.Append (Path.DirectorySeparatorChar);
+                               if (i + 1 < bPath.Length || aPath.Length - indx 
> 0)
+                                       result.Append 
(Path.DirectorySeparatorChar);
                        }
                        
-                       if (aPath.Length - indx <= 0)
-                               return ".";
                        
                        result.Append 
(String.Join(Path.DirectorySeparatorChar.ToString(), aPath, indx, aPath.Length 
- indx));
+                       if (result.Length == 0)
+                               return ".";
                        return result.ToString ();
                }
                

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to