]> source.dussan.org Git - archiva.git/commitdiff
Little fix for windows
authorEmmanuel Venisse <evenisse@apache.org>
Thu, 26 Apr 2007 14:33:45 +0000 (14:33 +0000)
committerEmmanuel Venisse <evenisse@apache.org>
Thu, 26 Apr 2007 14:33:45 +0000 (14:33 +0000)
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/branches/archiva-jpox-database-refactor@532761 13f79535-47bb-0310-9956-ffa450edef68

archiva-base/archiva-common/src/test/java/org/apache/maven/archiva/common/utils/PathUtilTest.java

index a66951511d030ee2df3198865759480732182ca3..f74e221144bfd63da5533be004d5a952c82e1314 100644 (file)
@@ -52,6 +52,11 @@ public class PathUtilTest
             workingDirname = workingDirname.substring( 0, workingDirname.length() - 2 );
         }
 
+        if ( !workingDirname.startsWith( "/" ) )
+        {
+            workingDirname = "/" + workingDirname;
+        }
+
         String path = "path/to/resource.xml";
         String expectedPath = "file:" + workingDirname + "/" + path;
 
@@ -70,6 +75,11 @@ public class PathUtilTest
             workingDirname = workingDirname.substring( 0, workingDirname.length() - 2 );
         }
 
+        if ( !workingDirname.startsWith( "/" ) )
+        {
+            workingDirname = "/" + workingDirname;
+        }
+
         String path = "path/to/resource.xml";
         String expectedPath = "file:" + workingDirname + "/" + path;