Mercurial > hg > tomcat-userconfig
changeset 7:ca0b81d28307
Compatibility fixes.
author | Mikhail Kryshen <mikhail@kryshen.net> |
---|---|
date | Sun, 01 Nov 2009 04:25:39 +0300 |
parents | 66a0db4d54aa |
children | ff1e55a2171f |
files | src/kryshen/catalina/startup/HomesUserDatabase.java src/kryshen/catalina/startup/UserConfig.java |
diffstat | 2 files changed, 17 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/src/kryshen/catalina/startup/HomesUserDatabase.java Sun Nov 01 02:27:18 2009 +0300 +++ b/src/kryshen/catalina/startup/HomesUserDatabase.java Sun Nov 01 04:25:39 2009 +0300 @@ -63,7 +63,7 @@ index++; - if (!home.isDirectory() || !home.canExecute()) { + if (!home.isDirectory() /* || !home.canExecute() */) { continue; }
--- a/src/kryshen/catalina/startup/UserConfig.java Sun Nov 01 02:27:18 2009 +0300 +++ b/src/kryshen/catalina/startup/UserConfig.java Sun Nov 01 04:25:39 2009 +0300 @@ -99,7 +99,7 @@ protected void deployUserApps(String user, File home) { File base = new File(home, directoryName); - if (!base.exists() || !base.isDirectory()) { + if (!base.exists() || !base.isDirectory() || !base.canRead()) { return; } @@ -130,21 +130,24 @@ } File dir = new File(base, files[i]); - if (dir.isDirectory()) { - String contextPath; - - if (files[i].equals("ROOT")) { - contextPath = "/~" + user; - } else { - contextPath = "/~" + user + '/' + files[i].replace('#', '/'); - } + + if (!dir.isDirectory() || !dir.canRead()) { + continue; + } + + String contextPath; - if (isServiced(contextPath)) { - continue; - } + if (files[i].equals("ROOT")) { + contextPath = "/~" + user; + } else { + contextPath = "/~" + user + '/' + files[i].replace('#', '/'); + } - deployDirectory(contextPath, dir, dir.getAbsolutePath()); + if (isServiced(contextPath)) { + continue; } + + deployDirectory(contextPath, dir, dir.getAbsolutePath()); } } }