changeset 20:d9b6abd14326

Fix appsPerUser limit.
author Mikhail Kryshen <mikhail@kryshen.net>
date Tue, 03 Nov 2009 04:06:30 +0300
parents d3495301ca01
children 282500da9a6c
files src/kryshen/catalina/userconfig/UserConfig.java
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/kryshen/catalina/userconfig/UserConfig.java	Tue Nov 03 04:04:45 2009 +0300
+++ b/src/kryshen/catalina/userconfig/UserConfig.java	Tue Nov 03 04:06:30 2009 +0300
@@ -144,7 +144,7 @@
 
         int appCount = 0;
 
-        for (int i = 0; i < files.length && appCount < appsPerUser; i++) {
+        for (int i = 0; i < files.length; i++) {
             if (files[i].equalsIgnoreCase("META-INF")) {
                 continue;
             }
@@ -160,7 +160,12 @@
             }
 
             deployUserApp(user, dir, files[i]);
+
             appCount++;
+
+            if (appsPerUser > 0 && appCount >= appsPerUser) {
+                break;
+            }
         }
     }