summaryrefslogtreecommitdiffstats
path: root/archiva-discoverer
diff options
context:
space:
mode:
authorEmmanuel Venisse <evenisse@apache.org>2006-10-05 14:34:06 +0000
committerEmmanuel Venisse <evenisse@apache.org>2006-10-05 14:34:06 +0000
commitfd29c31a300948181e25750d298edb2f4a122d45 (patch)
tree3b19f0eb6c1ad7e183d1962fb3f509a99e97eb68 /archiva-discoverer
parent7968e6819ec471df23bbcba73871cba657f6b41e (diff)
downloadarchiva-fd29c31a300948181e25750d298edb2f4a122d45.tar.gz
archiva-fd29c31a300948181e25750d298edb2f4a122d45.zip
Fix FNFE when basedir contains spaces
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@453251 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-discoverer')
-rw-r--r--archiva-discoverer/src/main/java/org/apache/maven/archiva/discoverer/AbstractDiscoverer.java13
1 files changed, 12 insertions, 1 deletions
diff --git a/archiva-discoverer/src/main/java/org/apache/maven/archiva/discoverer/AbstractDiscoverer.java b/archiva-discoverer/src/main/java/org/apache/maven/archiva/discoverer/AbstractDiscoverer.java
index b902d67c5..b6d17c44d 100644
--- a/archiva-discoverer/src/main/java/org/apache/maven/archiva/discoverer/AbstractDiscoverer.java
+++ b/archiva-discoverer/src/main/java/org/apache/maven/archiva/discoverer/AbstractDiscoverer.java
@@ -22,6 +22,7 @@ import org.codehaus.plexus.util.DirectoryScanner;
import org.codehaus.plexus.util.FileUtils;
import java.io.File;
+import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Iterator;
@@ -103,7 +104,17 @@ public abstract class AbstractDiscoverer
}
DirectoryScanner scanner = new DirectoryScanner();
- scanner.setBasedir( repositoryBase );
+ try
+ {
+ //Fix FNFE when repositoryBase contain spaces
+ //TODO: move this code in DirectoryScanner.setBasedir()
+ scanner.setBasedir( repositoryBase.getCanonicalFile() );
+ }
+ catch( IOException e )
+ {
+ scanner.setBasedir( repositoryBase );
+ }
+
if ( includes != null )
{
scanner.setIncludes( includes );