mirror of
https://github.com/GravitLauncher/Launcher
synced 2024-11-15 03:31:15 +03:00
[FIX] Profile duplicate
This commit is contained in:
parent
e6f5b585a7
commit
1e7a856a99
1 changed files with 1 additions and 2 deletions
|
@ -45,8 +45,7 @@ public void addProfile(ClientProfile profile) throws IOException {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(target == null) {
|
if(target == null) {
|
||||||
target = IOHelper.resolveIncremental(profilesDirPath,
|
target = profilesDirPath.resolve(profile.getTitle()+".json");
|
||||||
profile.getTitle(), "json");
|
|
||||||
oldProfile = profilesMap.get(target);
|
oldProfile = profilesMap.get(target);
|
||||||
if(oldProfile != null && !oldProfile.getUUID().equals(profile.getUUID())) {
|
if(oldProfile != null && !oldProfile.getUUID().equals(profile.getUUID())) {
|
||||||
throw new FileAlreadyExistsException(target.toString());
|
throw new FileAlreadyExistsException(target.toString());
|
||||||
|
|
Loading…
Reference in a new issue