Adjust DirectoryWatcher implementation for changed FileChange definition in eventcore.

This commit is contained in:
Sönke Ludwig 2017-11-21 21:42:44 +01:00
parent 3dd3636468
commit dad84e8a46

View file

@ -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;
}
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();
}
}