JETTY-1489 WebAppProvider attempts to deploy .svn folder

This commit is contained in:
Jan Bartel 2012-03-02 16:19:07 +11:00
parent 68fa3c50b4
commit 081071b42c
2 changed files with 17 additions and 5 deletions

View File

@ -28,6 +28,9 @@ public class ContextProvider extends ScanningAppProvider
if (!dir.exists())
return false;
String lowername = name.toLowerCase();
if (lowername.startsWith("."))
return false;
return (lowername.endsWith(".xml") && !new File(dir,name).isDirectory());
}
});

View File

@ -50,12 +50,21 @@ public class WebAppProvider extends ScanningAppProvider
return false;
}
// is it a directory for an existing war file?
if (file.isDirectory() &&
(new File(dir,name+".war").exists() ||
new File(dir,name+".WAR").exists()))
{
//ignore hidden files
if (lowername.startsWith("."))
return false;
if (file.isDirectory())
{
// is it a directory for an existing war file?
if (new File(dir,name+".war").exists() ||
new File(dir,name+".WAR").exists())
return false;
//is it a sccs dir?
if ("cvs".equals(lowername) || "cvsroot".equals(lowername))
return false;
}
// is there a contexts config file