Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix markdown document deleting #164829

Merged
merged 1 commit into from
Oct 27, 2022
Merged

Fix markdown document deleting #164829

merged 1 commit into from
Oct 27, 2022

Conversation

mjbvz
Copy link
Collaborator

@mjbvz mjbvz commented Oct 27, 2022

Fixes #164562

My previous fix was incorrect as it checked if the document existed by still consulting our _documentCache. When we are deleting/renaming an opened md document, it should pretty much always exist in _documentCache so the check was pointless

The fix is to instead treat this.documents and the file system as the source of truth when determining if the doc should be deleted or not

Fixes microsoft#164562

My previous fix was incorrect as it checked if the document existed by still consulting our `_documentCache`. When we are deleting/renaming an opened md document, it should pretty much always exist in our cache

The fix is to instead treat `this.documents` and the file system as the source of truth when determining if the doc should be deleted or not
@mjbvz mjbvz added this to the October 2022 milestone Oct 27, 2022
@mjbvz mjbvz self-assigned this Oct 27, 2022
@mjbvz mjbvz enabled auto-merge (squash) October 27, 2022 19:44
@mjbvz mjbvz merged commit 3544aab into microsoft:main Oct 27, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Dec 11, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

folder rename does not result in updated path
2 participants