Changeset b5d7768


Ignore:
Timestamp:
Jan 15, 2012 4:46:34 PM (9 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
3d2d604
Parents:
557cb30
Message:
  • Router: Save previous version in config so we know when we updated
File:
1 edited

Legend:

Unmodified
Added
Removed
  • router/java/src/net/i2p/router/Router.java

    r557cb30 rb5d7768  
    242242            _config.put("router.firstInstalled", now);
    243243            _config.put("router.updateLastInstalled", now);
     244            // First added in 0.8.13
     245            _config.put("router.previousVersion", RouterVersion.VERSION);
    244246            saveConfig();
    245247        }
     
    10421044            }
    10431045        }
     1046
     1047        // Set the last version to the current version, since 0.8.13
     1048        if (!RouterVersion.VERSION.equals(_config.get("router.previousVersion"))) {
     1049            _config.put("router.previousVersion", RouterVersion.VERSION);
     1050            saveConfig();
     1051        }
     1052
    10441053        _context.removeShutdownTasks();
    10451054        try { _context.clientManager().shutdown(); } catch (Throwable t) { _log.error("Error shutting down the client manager", t); }
     
    13461355                // Moved above the extract so we don't NCDFE
    13471356                _config.put("router.updateLastInstalled", "" + System.currentTimeMillis());
     1357                // Set the last version to the current version, since 0.8.13
     1358                _config.put("router.previousVersion", RouterVersion.VERSION);
    13481359                saveConfig();
    13491360                ok = FileUtil.extractZip(updateFile, _context.getBaseDir());
Note: See TracChangeset for help on using the changeset viewer.