fix(sync): preserve WebDAV remote root casing#425
Open
codedogQBY wants to merge 1 commit into
Open
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.
Analysis
Issue #169 reports that saving a WebDAV remote folder with uppercase letters rewrites the path to lowercase. The root cause is
sanitizeWebDavRemoteRoot(): it trims and collapses slashes, but also called.toLowerCase(). WebDAV paths are often case-sensitive, so this can point sync/import at a different remote directory.Issue #383 reports the same mobile WebDAV failure mode when uppercase letters are used: uploads fail after the configured WebDAV path/casing is changed. Preserving the configured root casing fixes that path mismatch.
Issue #178 is the related filename/path safety case for Chinese/Japanese WebDAV book paths. The current client already builds request URLs by percent-encoding path segments; this PR adds regression coverage to keep those Unicode paths in the URL and out of custom request headers.
Changes
Apps/ReadAny-Syncexactly instead of lowercasing it.Verification
pnpm exec biome check packages/core/src/sync/webdav-client.ts packages/core/src/sync/webdav-client.test.ts packages/core/src/stores/sync-store.test.tspnpm --filter @readany/core test -- webdav-client sync-storepnpm --filter @readany/core test -- sync-files simple-sync webdav-clientFixes #169
Fixes #383
Fixes #178