fix(local-replica): handle Windows paths when syncing saved documents - #397
Open
Rinfly wants to merge 1 commit into
Open
fix(local-replica): handle Windows paths when syncing saved documents#397Rinfly wants to merge 1 commit into
Rinfly wants to merge 1 commit into
Conversation
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.
Fix (#394) Local Replica uploads on Windows when a document is saved from VS Code.
In v0.15.10, Local Replica synchronization was changed to upload files from
onDidSaveTextDocumentinstead of reacting to all filesystem changes. The saved document was then checked using a case-sensitive URI string prefix comparison:On Windows, the project URI and document URI may represent the same filesystem path with different drive-letter or path casing. In that case, the prefix check fails and the save event is silently ignored, so
syncToVFS()is never called.Changes
Uri.fsPath.path.resolve().path.relative()to determine whether the saved document is inside the Local Replica directory.fileURIs.This preserves the v0.15.10 save-only synchronization behavior. It does not restore filesystem-change uploads, so changes made by Git, compilers, or other external processes are not automatically pushed.
Testing
npm run compilenpm testmain.texand verified that the change was uploaded to Overleaf.