1
0
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:
Luck
2017-06-14 17:32:02 +01:00
parent 046daf23d0
commit 413e304845

View File

@@ -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.