private void MoveFilesToVersion2Location() { // we upgrade only files, there was no SqlPersistence before // don't need to refresh the file location, because if the files were changed // are already in use, they will be reloaded MoveThumbsDirectory(); // don't move the logs directory, because it is in use by Log4net library. MoveDataFile(FileLocations.HISTORY_FILENAME); MoveDataFile(FileLocations.TOOLSTRIPS_FILENAME); MoveDataFile(FileLocations.CREDENTIALS_FILENAME); // only this is already in use if started with default location MoveDataFile(FileLocations.CONFIG_FILENAME); settings.ForceReload(); var contentUpgrade = new FilesV2ContentUpgrade(this.persistence, this.connectionManager, RequestPassword.KnowsUserPassword); contentUpgrade.Run(); }
private IPersistence RunUpgrade() { var persistence = new FilePersistence(); var contentUpgrade = new FilesV2ContentUpgrade(persistence, GetMasterPassword); contentUpgrade.Run(); settings.ForceReload(); // because we changed its file, while upgrading return persistence; }
private void MoveFilesToVersion2Location() { // we upgrade only files, there was no SqlPersistence before // don't need to refresh the file location, because if the files were changed // are already in use, they will be reloaded MoveThumbsDirectory(); // don't move the logs directory, because it is in use by Log4net library. MoveDataFile(FileLocations.HISTORY_FILENAME); MoveDataFile(FileLocations.TOOLSTRIPS_FILENAME); MoveDataFile(FileLocations.CREDENTIALS_FILENAME); // only this is already in use if started with default location MoveDataFile(FileLocations.CONFIG_FILENAME); settings.ForceReload(); var contentUpgrade = new FilesV2ContentUpgrade(this.persistence, RequestPassword.KnowsUserPassword); contentUpgrade.Run(); }