]> source.dussan.org Git - archiva.git/commitdiff
fix windauze unit test
authorOlivier Lamy <olamy@apache.org>
Fri, 16 Mar 2012 23:32:49 +0000 (23:32 +0000)
committerOlivier Lamy <olamy@apache.org>
Fri, 16 Mar 2012 23:32:49 +0000 (23:32 +0000)
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1301822 13f79535-47bb-0310-9956-ffa450edef68

archiva-modules/archiva-web/archiva-webapp/src/main/java/org/apache/archiva/web/action/UploadAction.java

index 15380233fe470f0b49491419313c32656b8a45a8..fccc0ffd03fd94abc9aa0339c3da6e9146d576dd 100644 (file)
@@ -306,13 +306,13 @@ public class UploadAction
 
             String artifactPath = repository.toPath( artifactReference );
 
-            log.debug( "artifactPath:{}", artifactPath );
-
-            int lastIndex = artifactPath.lastIndexOf( File.separatorChar );
+            int lastIndex = artifactPath.lastIndexOf( '/' );
 
             String path = artifactPath.substring( 0, lastIndex );
             File targetPath = new File( repoConfig.getLocation(), path );
 
+            log.debug( "artifactPath: {} found targetPath: {}", artifactPath, targetPath );
+
             Date lastUpdatedTimestamp = Calendar.getInstance().getTime();
             int newBuildNumber = -1;
             String timestamp = null;