updatePropertyValue(p, P_DOWNLOAD_RETRY);
updatePropertyValue(p, P_DOWNLOAD_WAIT);
- updatePropertyValue(p, P_DOWNLOAD_MYLIST);
+ updatePropertyValueArray(p, P_DOWNLOAD_MYLIST);
try {
properties.save();
properties.setProperty(key, value);
}
+ private void updatePropertyValueArray(Configuration newProp, String key) {
+ String[] values = newProp.getStringArray(key);
+ if (values.length < 1) {
+ values = properties.getStringArray(key);
+ }
+ properties.setProperty(key, values);
+ }
+
private static void createNewConfigFile(File file) throws IOException {
ArrayList<CharSequence> props = new ArrayList<CharSequence>();
public class Main {
- public static final String VERSION = "version 0.3.0";
+ public static final String VERSION = "version 0.3.1";
private static Log log = LogFactory.getLog(Main.class);
public static void main(String[] args) throws IOException {