mirror of
https://github.com/lucko/LuckPerms.git
synced 2025-09-25 05:21:29 +02:00
Fix NPE with null context in FileWatcher
This commit is contained in:
@@ -115,10 +115,14 @@ public class FileWatcher implements Runnable {
|
||||
List<WatchEvent<?>> watchEvents = key.pollEvents();
|
||||
|
||||
for (WatchEvent<?> event : watchEvents) {
|
||||
Path name = (Path) event.context();
|
||||
Path file = path.resolve(name);
|
||||
Path context = (Path) event.context();
|
||||
|
||||
String fileName = name.toString();
|
||||
if (context == null) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Path file = path.resolve(context);
|
||||
String fileName = context.toString();
|
||||
|
||||
if (internalChanges.containsKey(id + "/" + fileName)) {
|
||||
// This file was modified by the system.
|
||||
|
Reference in New Issue
Block a user