use of org.jabref.logic.exporter.FileSaveSession in project jabref by JabRef.
the class BackupManager method performBackup.
private void performBackup(Path backupPath) {
try {
Charset charset = bibDatabaseContext.getMetaData().getEncoding().orElse(preferences.getDefaultEncoding());
SavePreferences savePreferences = SavePreferences.loadForSaveFromPreferences(preferences).withEncoding(charset).withMakeBackup(false);
new BibtexDatabaseWriter<>(FileSaveSession::new).saveDatabase(bibDatabaseContext, savePreferences).commit(backupPath);
} catch (SaveException e) {
LOGGER.error("Error while saving file.", e);
}
}
Aggregations