diff options
author | Olivier Lamy <olamy@apache.org> | 2012-03-30 10:24:07 +0000 |
---|---|---|
committer | Olivier Lamy <olamy@apache.org> | 2012-03-30 10:24:07 +0000 |
commit | f994014554c5b18e7553b3ed5c32e8bf30e33830 (patch) | |
tree | bf8177f2829725a0b2fa1771c10ea72826adda6c /archiva-modules/archiva-base | |
parent | f6b701ede41ab674205154a7eb24765f5d564f1f (diff) | |
download | archiva-f994014554c5b18e7553b3ed5c32e8bf30e33830.tar.gz archiva-f994014554c5b18e7553b3ed5c32e8bf30e33830.zip |
take care of windows file format and replace for url fetching
see mail thread: http://markmail.org/message/izqupvyvwojdamk3
git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1307348 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/archiva-base')
-rw-r--r-- | archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java b/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java index d0db565f1..aa72a8b1a 100644 --- a/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java +++ b/archiva-modules/archiva-base/archiva-proxy/src/main/java/org/apache/archiva/proxy/DefaultRepositoryProxyConnectors.java @@ -51,7 +51,9 @@ import org.apache.archiva.scheduler.ArchivaTaskScheduler; import org.apache.archiva.scheduler.repository.RepositoryTask; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.io.FileUtils; +import org.apache.commons.io.FilenameUtils; import org.apache.commons.lang.StringUtils; +import org.apache.commons.lang.SystemUtils; import org.apache.maven.wagon.ConnectionException; import org.apache.maven.wagon.ResourceDoesNotExistException; import org.apache.maven.wagon.Wagon; @@ -286,6 +288,12 @@ public class DefaultRepositoryProxyConnectors String targetPath = targetRepository.toPath( artifact ); + if ( SystemUtils.IS_OS_WINDOWS ) + { + // toPath use system PATH_SEPARATOR so on windows url are \ which doesn't work very well :-) + targetPath = FilenameUtils.separatorsToUnix( targetPath ); + } + try { File downloadedFile = |