Repository navigation
Fix guide source watcher erroring when a file is deleted (#158) [26.1] - #163
Merged
Merged
Conversation
Backport of #162. pageDeleted built the fallback path for language-specific pages with Identifier.toString(), which yields "namespace:path". Resolving that against the source folder throws InvalidPathException on Windows because of the colon, aborting the watcher event. Use the identifier's path component instead and only try the fallback if the default-language page actually exists. Adds an integration test that watches a temporary directory with a real DirectoryWatcher and deletes pages, using Awaitility for the polling.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #162 to
26.1.Deleting a file in a watched guide source folder crashed the watcher with
InvalidPathException: Illegal char <:>, becausepageDeletedresolvedIdentifier.toString()(namespace:path) against the source folder.pageId().getPath()for the default-language fallback path.Includes an integration test that watches a temporary directory with a real
DirectoryWatcher, deletes pages on disk and waits for the reported changes (Awaitility added as a test-only dependency).Closes #158