Skip to content

Commit

Permalink
fix(common): create parent dirs of settings path only if not exist
Browse files Browse the repository at this point in the history
  • Loading branch information
thetric committed Mar 9, 2017
1 parent 15b25b1 commit 49557e2
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@ final class UserPreferenceServiceImpl implements UserPreferenceService {
@Override
void saveUserPreferences(UserPreferences userPreferences) throws IOException {
if (Files.notExists(settingsFile)) {
Files.createDirectories(settingsFile.parent)
if (Files.notExists(settingsFile.parent)) {
Files.createDirectories(settingsFile.parent)
}
Files.createFile settingsFile
}
settingsFile.withWriter StandardCharsets.UTF_8.name(), {
Expand Down

0 comments on commit 49557e2

Please sign in to comment.