Skip to content

Commit

Permalink
make sure file exists before copying it
Browse files Browse the repository at this point in the history
  • Loading branch information
granny committed Sep 27, 2023
1 parent 4fbf75d commit 7ac4c44
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public void reload() {
rethrow(e);
}

if (!hasConfigVersion) {
if (Files.exists(config) && !hasConfigVersion) {
try {
Path backupConfig = this.getBackupConfigFile();
Files.copy(configFile, backupConfig, StandardCopyOption.REPLACE_EXISTING);
Expand Down

0 comments on commit 7ac4c44

Please sign in to comment.