Adjust DirectoryWatcher implementation for changed FileChange definition in eventcore.
This commit is contained in:
parent
3dd3636468
commit
dad84e8a46
|
@ -587,7 +587,13 @@ struct DirectoryWatcher { // TODO: avoid all those heap allocations!
|
||||||
case FileChangeKind.removed: ct = DirectoryChangeType.removed; break;
|
case FileChangeKind.removed: ct = DirectoryChangeType.removed; break;
|
||||||
case FileChangeKind.modified: ct = DirectoryChangeType.modified; 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();
|
this.changeEvent.emit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue