Skip to content

Commit

Permalink
Added new help docs, added gitignore directory and fixed an issue wit…
Browse files Browse the repository at this point in the history
…h creating properties in a directory that does not exist
  • Loading branch information
CodeDead committed Apr 2, 2023
1 parent 5af6485 commit 31d0001
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,4 @@ logs/*

/default.properties
/help.pdf
.opal/
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,7 @@ clean.doFirst {
delete 'license.pdf'
delete 'help.pdf'
delete 'logs'
delete '.opal'
}

repositories {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ public void createDefaultProperties() throws IOException {
try (final InputStream is = getClass().getClassLoader().getResourceAsStream(getPropertiesResourceLocation())) {
if (is != null) {
logger.info("Creating default properties file at {}", getPropertiesFileLocation());
try {
final Path p = Paths.get(new File(propertiesPath.toString()).getParent());
Files.createDirectories(p);
} catch (final IOException ex) {
logger.error("Could not create the parent directories for the properties file", ex);
}
Files.copy(is, propertiesPath);
} else {
throw new IOException(String.format("Could not load default properties from application resources (%s)!", getPropertiesResourceLocation()));
Expand Down
Binary file modified src/main/resources/documents/help.pdf
Binary file not shown.

0 comments on commit 31d0001

Please sign in to comment.