mirror of https://github.com/apache/archiva.git
Fix FNFE when basedir contains spaces
git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@453251 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7968e6819e
commit
fd29c31a30
|
@ -22,6 +22,7 @@ import org.codehaus.plexus.util.DirectoryScanner;
|
||||||
import org.codehaus.plexus.util.FileUtils;
|
import org.codehaus.plexus.util.FileUtils;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
@ -103,7 +104,17 @@ public abstract class AbstractDiscoverer
|
||||||
}
|
}
|
||||||
|
|
||||||
DirectoryScanner scanner = new DirectoryScanner();
|
DirectoryScanner scanner = new DirectoryScanner();
|
||||||
|
try
|
||||||
|
{
|
||||||
|
//Fix FNFE when repositoryBase contain spaces
|
||||||
|
//TODO: move this code in DirectoryScanner.setBasedir()
|
||||||
|
scanner.setBasedir( repositoryBase.getCanonicalFile() );
|
||||||
|
}
|
||||||
|
catch( IOException e )
|
||||||
|
{
|
||||||
scanner.setBasedir( repositoryBase );
|
scanner.setBasedir( repositoryBase );
|
||||||
|
}
|
||||||
|
|
||||||
if ( includes != null )
|
if ( includes != null )
|
||||||
{
|
{
|
||||||
scanner.setIncludes( includes );
|
scanner.setIncludes( includes );
|
||||||
|
|
Loading…
Reference in New Issue