[Monodevelop-patches-list] r581 - trunk/MonoDevelop/src/Main/Core/Services

commit-watcher at mono-cvs.ximian.com commit-watcher at mono-cvs.ximian.com
Mon Jan 19 21:06:52 EST 2004


Author: benm
Date: 2004-01-19 21:06:51 -0500 (Mon, 19 Jan 2004)
New Revision: 581

Modified:
   trunk/MonoDevelop/src/Main/Core/Services/FileUtilityService.cs
Log:
fixup

Modified: trunk/MonoDevelop/src/Main/Core/Services/FileUtilityService.cs
===================================================================
--- trunk/MonoDevelop/src/Main/Core/Services/FileUtilityService.cs	2004-01-20 01:52:52 UTC (rev 580)
+++ trunk/MonoDevelop/src/Main/Core/Services/FileUtilityService.cs	2004-01-20 02:06:51 UTC (rev 581)
@@ -148,29 +148,8 @@
 		/// to the relative path absoulte.
 		/// </summary>
 		public string RelativeToAbsolutePath(string baseDirectoryPath, string relPath)
-		{
-			/*if (separators[0] != separators[1] && relPath.IndexOf(separators[1]) != -1) {
-				return relPath;
-			}*/
-			string[] bPath = baseDirectoryPath.Split(dir_sep);
-			string[] rPath = relPath.Split(dir_sep);
-			int indx = 0;
-		
-			for (; indx < rPath.Length; ++indx) {
-				if (!rPath[indx].Equals("..")) {
-					break;
-				}
-			}
-			
-			if (indx == 0) {
-				return baseDirectoryPath + separators[0] + String.Join(Path.DirectorySeparatorChar.ToString(), rPath);
-			}
-			
-			string erg = String.Join(Path.DirectorySeparatorChar.ToString(), bPath, 0, Math.Max(0, bPath.Length - indx));
-			
-			erg += separators[0] + String.Join(Path.DirectorySeparatorChar.ToString(), rPath, indx, rPath.Length-indx);
-			
-			return Path.GetFullPath (erg);
+		{			
+			return Path.GetFullPath (baseDirectoryPath + Path.DirectorySeparatorChar + relPath);
 		}
 		
 		/// <summary>




More information about the Monodevelop-patches-list mailing list