mirror of
https://github.com/Stirling-Tools/Stirling-PDF.git
synced 2024-11-11 02:10:11 +01:00
Update InitialSecuritySetup.java
This commit is contained in:
parent
e9042e0b7e
commit
26a457f9d0
@ -39,12 +39,11 @@ public class InitialSecuritySetup {
|
||||
userService.isUsernameValidWithReturn(initialUsername);
|
||||
} catch (IllegalArgumentException e) {
|
||||
Path pathToFile = Paths.get("configs/settings.yml");
|
||||
try {
|
||||
if (Files.exists(pathToFile)) {
|
||||
Files.delete(pathToFile);
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
logger.info(ex.getMessage());
|
||||
|
||||
if (Files.exists(pathToFile)) {
|
||||
logger.error(
|
||||
"Invalid initial username provided , username can only contain letters, numbers and the following special characters @._+- or must be a valid email address.");
|
||||
System.exit(1);
|
||||
}
|
||||
throw e;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user