Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Bartel2012-03-02 00:19:07 -0500
committerJan Bartel2012-03-02 00:19:07 -0500
commit081071b42c54f69e6f1f7916471eeb1e19473c7e (patch)
treed8581625b6df10a020d5ec4705d23fa4e3e7710a /jetty-deploy
parent68fa3c50b4f04dc48944a58f5b128f3521f6719a (diff)
downloadorg.eclipse.jetty.project-081071b42c54f69e6f1f7916471eeb1e19473c7e.tar.gz
org.eclipse.jetty.project-081071b42c54f69e6f1f7916471eeb1e19473c7e.tar.xz
org.eclipse.jetty.project-081071b42c54f69e6f1f7916471eeb1e19473c7e.zip
JETTY-1489 WebAppProvider attempts to deploy .svn folder
Diffstat (limited to 'jetty-deploy')
-rw-r--r--jetty-deploy/src/main/java/org/eclipse/jetty/deploy/providers/ContextProvider.java3
-rw-r--r--jetty-deploy/src/main/java/org/eclipse/jetty/deploy/providers/WebAppProvider.java19
2 files changed, 17 insertions, 5 deletions
diff --git a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/providers/ContextProvider.java b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/providers/ContextProvider.java
index 1fc1bc390b..323f836bf9 100644
--- a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/providers/ContextProvider.java
+++ b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/providers/ContextProvider.java
@@ -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());
}
});
diff --git a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/providers/WebAppProvider.java b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/providers/WebAppProvider.java
index f2137a6699..c924b455a9 100644
--- a/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/providers/WebAppProvider.java
+++ b/jetty-deploy/src/main/java/org/eclipse/jetty/deploy/providers/WebAppProvider.java
@@ -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

Back to the top