Skip to content

Commit

Permalink
Fix #596 - WatchEvent.context is file name
Browse files Browse the repository at this point in the history
  • Loading branch information
skybber committed Oct 3, 2024
1 parent f857c04 commit 3b70307
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ private void sendFakeCreateEvents(Path dir) {
try (DirectoryStream<Path> stream = Files.newDirectoryStream(dir)) {
for (Path entry : stream) {
if (Files.isRegularFile(entry)) {
HotswapAgentWatchEvent<Path> ev = new HotswapAgentWatchEvent(ENTRY_CREATE, entry);
String name = entry.getFileName().toString();
HotswapAgentWatchEvent<Path> ev = new HotswapAgentWatchEvent(ENTRY_CREATE, name);
LOGGER.debug("Fake watch event '{}' on '{}' --> {}", ev.kind().name(), entry, name);
dispatcher.add(ev, entry);
}
}
Expand Down

0 comments on commit 3b70307

Please sign in to comment.