diff --git a/source/vibe/core/file.d b/source/vibe/core/file.d index efb74e8..7c641c5 100644 --- a/source/vibe/core/file.d +++ b/source/vibe/core/file.d @@ -587,7 +587,13 @@ struct DirectoryWatcher { // TODO: avoid all those heap allocations! case FileChangeKind.removed: ct = DirectoryChangeType.removed; break; case FileChangeKind.modified: ct = DirectoryChangeType.modified; break; } - this.changes ~= DirectoryChange(ct, NativePath.fromTrustedString(change.directory) ~ NativePath.fromTrustedString(change.name.idup)); + + static if (is(typeof(change.baseDirectory))) { + // eventcore 0.8.23 and up + this.changes ~= DirectoryChange(ct, NativePath.fromTrustedString(change.baseDirectory) ~ NativePath.fromTrustedString(change.directory) ~ NativePath.fromTrustedString(change.name.idup)); + } else { + this.changes ~= DirectoryChange(ct, NativePath.fromTrustedString(change.directory) ~ NativePath.fromTrustedString(change.name.idup)); + } this.changeEvent.emit(); } }