James Moger
2011-05-28 28d6b2a860740557bf93dd0f9a48d059379ed696
src/com/gitblit/FileSettings.java
@@ -34,9 +34,15 @@
   private final Logger logger = LoggerFactory.getLogger(FileSettings.class);
   private final File propertiesFile;
   private Properties properties = new Properties();
   private long lastread;
   public FileSettings(String file) {
      this.propertiesFile = new File(file);
   }
   @Override
   public List<String> getAllKeys(String startingWith) {
@@ -139,14 +145,13 @@
   }
   private synchronized Properties read() {
      File file = new File(Constants.PROPERTIES_FILE);
      if (file.exists() && (file.lastModified() > lastread)) {
      if (propertiesFile.exists() && (propertiesFile.lastModified() > lastread)) {
         FileInputStream is = null;
         try {
            properties = new Properties();
            is = new FileInputStream(Constants.PROPERTIES_FILE);
            is = new FileInputStream(propertiesFile);
            properties.load(is);
            lastread = file.lastModified();
            lastread = propertiesFile.lastModified();
         } catch (FileNotFoundException f) {
            // IGNORE - won't happen because file.exists() check above
         } catch (Throwable t) {
@@ -166,6 +171,6 @@
   @Override
   public String toString() {
      return new File(Constants.PROPERTIES_FILE).getAbsolutePath();
      return propertiesFile.getAbsolutePath();
   }
}