Skip to content
Snippets Groups Projects
Commit 404284cd authored by Greg DiCristofaro's avatar Greg DiCristofaro
Browse files

fix for save license

parent 9b59d2c6
No related branches found
No related tags found
No related merge requests found
...@@ -56,11 +56,7 @@ public synchronized boolean saveLicenseResponse(LicenseResponse licenseResponse) ...@@ -56,11 +56,7 @@ public synchronized boolean saveLicenseResponse(LicenseResponse licenseResponse)
File licenseFile = getCTLicenseFile(); File licenseFile = getCTLicenseFile();
try { try {
licenseFile.getParentFile().mkdirs(); licenseFile.getParentFile().mkdirs();
if (licenseResponse != null) { objectMapper.writeValue(licenseFile, licenseResponse);
objectMapper.writeValue(licenseFile, licenseResponse);
} else if (licenseFile.exists()) {
Files.delete(licenseFile.toPath());
}
return true; return true;
} catch (IOException ex) { } catch (IOException ex) {
logger.log(Level.WARNING, "There was an error writing CyberTriage license to file: " + licenseFile.getAbsolutePath(), ex); logger.log(Level.WARNING, "There was an error writing CyberTriage license to file: " + licenseFile.getAbsolutePath(), ex);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment