mirror of
https://github.com/LuckPerms/LuckPerms.git
synced 2024-11-30 22:53:27 +01:00
Fix NPE with null context in FileWatcher
This commit is contained in:
parent
046daf23d0
commit
413e304845
@ -115,10 +115,14 @@ public class FileWatcher implements Runnable {
|
|||||||
List<WatchEvent<?>> watchEvents = key.pollEvents();
|
List<WatchEvent<?>> watchEvents = key.pollEvents();
|
||||||
|
|
||||||
for (WatchEvent<?> event : watchEvents) {
|
for (WatchEvent<?> event : watchEvents) {
|
||||||
Path name = (Path) event.context();
|
Path context = (Path) event.context();
|
||||||
Path file = path.resolve(name);
|
|
||||||
|
|
||||||
String fileName = name.toString();
|
if (context == null) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
Path file = path.resolve(context);
|
||||||
|
String fileName = context.toString();
|
||||||
|
|
||||||
if (internalChanges.containsKey(id + "/" + fileName)) {
|
if (internalChanges.containsKey(id + "/" + fileName)) {
|
||||||
// This file was modified by the system.
|
// This file was modified by the system.
|
||||||
|
Loading…
Reference in New Issue
Block a user