]> source.dussan.org Git - archiva.git/commitdiff
Fixing .toRelative() to operate in a platform neutral way. working with filesystems...
authorJoakim Erdfelt <joakime@apache.org>
Tue, 18 Sep 2007 04:01:15 +0000 (04:01 +0000)
committerJoakim Erdfelt <joakime@apache.org>
Tue, 18 Sep 2007 04:01:15 +0000 (04:01 +0000)
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@576682 13f79535-47bb-0310-9956-ffa450edef68

archiva-base/archiva-common/src/main/java/org/apache/maven/archiva/common/utils/PathUtil.java

index ddacedcc41f277efe2db3040689db7fd28802e86..836838e414a9bd956f0681b848cd3a7d1fb99cec 100644 (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 );
         }