mirror of
https://github.com/BentoBoxWorld/BentoBox.git
synced 2024-11-27 05:05:18 +01:00
Fixed a small code smell in LocalesManager
This commit is contained in:
parent
ee06a55d02
commit
32e174daed
@ -201,7 +201,7 @@ public class LocalesManager {
|
||||
// We cannot use Bukkit's saveResource, because we want it to go into a specific folder, so...
|
||||
// Get the last part of the name
|
||||
int lastIndex = name.lastIndexOf('/');
|
||||
File targetFile = new File(localeDir, name.substring(lastIndex >= 0 ? lastIndex : 0));
|
||||
File targetFile = new File(localeDir, name.substring(Math.max(lastIndex, 0)));
|
||||
copyFile(name, targetFile);
|
||||
// Update the locale file if it exists already
|
||||
try (InputStreamReader in = new InputStreamReader(plugin.getResource(name))) {
|
||||
|
Loading…
Reference in New Issue
Block a user