Cleanup deleted resource from resource manager's cache (#8174)

Signed-off-by: Vladyslav Zhukovskyi <vzhukovs@redhat.com>
6.19.x
Vladyslav Zhukovskyi 2018-01-11 10:51:19 +02:00 committed by GitHub
parent 58991906ac
commit 4a2f046e38
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions

View File

@ -1112,8 +1112,10 @@ public final class ResourceManager {
}
private Promise<Void> onExternalDeltaMoved(final ResourceDelta delta) {
final Optional<Resource> toRemove = store.getResource(delta.getFromPath());
store.dispose(delta.getFromPath(), true);
Optional<Resource> toRemove = store.getResource(delta.getFromPath());
Path pathToDispose = Path.commonPath(delta.getFromPath(), delta.getToPath());
store.dispose(pathToDispose, true);
return findResource(delta.getToPath())
.thenPromise(