Skip to content

Commit

Permalink
Fixed local database cannot be created due to incorrect checking of r…
Browse files Browse the repository at this point in the history
…eturn value (#866)
  • Loading branch information
OmerBenGera committed Jan 22, 2022
1 parent a4ee9bd commit b895512
Showing 1 changed file with 1 addition and 4 deletions.
Expand Up @@ -45,10 +45,7 @@ public boolean createConnection() {
File file = new File(plugin.getDataFolder(), "database.db");

if (!file.exists()) {
if (!file.getParentFile().mkdirs()) {
log("&cFailed to create parent folder directories.");
return false;
}
file.getParentFile().mkdirs();
try {
if (!file.createNewFile()) {
log("&cFailed to create database file.");
Expand Down

0 comments on commit b895512

Please sign in to comment.