use of org.openlca.core.model.Source in project olca-app by GreenDelta.
the class SourceInfoPage method copyAndSetFile.
private void copyAndSetFile(File file, File dbFile) {
try {
log.trace("copy file {} to database folder", file);
File dir = dbFile.getParentFile();
if (!dir.exists())
dir.mkdirs();
Files.copy(file, dbFile);
Source source = getModel();
source.externalFile = dbFile.getName();
getEditor().setDirty(true);
updateFileLink();
} catch (Exception e) {
log.error("failed to copy file", e);
}
}
Aggregations