From bfeec55499fe192872d58f84a3de93fcec34c0cd Mon Sep 17 00:00:00 2001 From: hns Date: Thu, 5 Jun 2003 17:12:53 +0000 Subject: [PATCH] Allow zipped files to add to app.properties and db.properties. --- src/helma/framework/core/ZippedAppFile.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/helma/framework/core/ZippedAppFile.java b/src/helma/framework/core/ZippedAppFile.java index 85d18374..a312970e 100644 --- a/src/helma/framework/core/ZippedAppFile.java +++ b/src/helma/framework/core/ZippedAppFile.java @@ -80,7 +80,17 @@ public class ZippedAppFile implements Updatable { String ename = entry.getName(); StringTokenizer st = new StringTokenizer(ename, "/"); - if (st.countTokens() == 2) { + int tokens = st.countTokens(); + if (tokens == 1) { + String fname = st.nextToken(); + + if ("app.properties".equalsIgnoreCase(fname)) { + app.props.addProps(file.getName(), zip.getInputStream(entry)); + } else if ("db.properties".equalsIgnoreCase(fname)) { + app.dbProps.addProps(file.getName(), zip.getInputStream(entry)); + } + + } else if (tokens == 2) { String dir = st.nextToken(); String fname = st.nextToken();