Fixing .toRelative() to operate in a platform neutral way. working with filesystems and urls equally as well.

git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@576682 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Joakim Erdfelt 2007-09-18 04:01:15 +00:00
parent 55baa9dff8
commit b1b4229880
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ public class PathUtil
*/
public static String getRelative( String basedir, String child )
{
if ( basedir.endsWith( File.separator ) )
if ( basedir.endsWith( "/" ) || basedir.endsWith( "\\" ) )
{
basedir = basedir.substring( 0, basedir.length() - 1 );
}