-
Notifications
You must be signed in to change notification settings - Fork 0
Fix WebDAV GetRelativePath to handle full URLs from server responses #36
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
Merged
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
…ebDAV resource URLs Co-authored-by: Menelion <595597+Menelion@users.noreply.github.com>
Co-authored-by: Menelion <595597+Menelion@users.noreply.github.com>
Contributor
Author
|
Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
Copilot
AI
changed the title
[WIP] Fix CI issues and reconcile dev branch
Fix WebDAV GetRelativePath to handle full URLs from server responses
Jan 14, 2026
Menelion
added a commit
that referenced
this pull request
Jan 14, 2026
* Try to reconcile dev with CI and fix tests finally * Fix CS * Try fixing workflow * More fixes * Meow * Meow2 * Meow3 * Meow4 * Meow5 * meow6 * meow7 * Meow8 * Meow9 * meow11 * Meow12 * meow13 * meow14 * Meow10 * meow15 * meow16 * meow17 * meow18 * meow19 * meow20 * meow21 * meow22 * meow23 * meow23 * meow24 * meow25 * meow26 * meow27 * Fix SFTP test failures in chrooted environments (#33) * Initial plan * Fix SFTP test root path handling for chrooted environments - Handle empty SFTP_TEST_ROOT properly (use relative path instead of /tmp/sharpsync-tests) - When root is empty string (chrooted env), use relative paths for test directories - This fixes "No such file" errors when creating test directories in CI Co-authored-by: Menelion <595597+Menelion@users.noreply.github.com> * Improve SFTP chroot detection and path handling - Simplify chroot detection: assume relative paths when RootPath doesn't start with "/" - Fix exception handling to catch SftpPathNotFoundException in addition to permission errors - This should fix issues with chrooted SFTP environments in CI - Separate chroot detection from root path creation logic Co-authored-by: Menelion <595597+Menelion@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Menelion <595597+Menelion@users.noreply.github.com> * Fix whitespace formatting in SftpStorageTests.cs (#34) * Initial plan * Fix whitespace formatting in SftpStorageTests.cs Co-authored-by: Menelion <595597+Menelion@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Menelion <595597+Menelion@users.noreply.github.com> * Fix SFTP integration tests by configuring writable chroot directory (#35) * Initial plan * Fix SFTP test configuration for chrooted environment - Change SFTP container to use command array format for proper parsing - Set SFTP_TEST_ROOT to "upload" directory which is writable by test user - Remove volume mount that was causing permission issues - The atmoz/sftp image chroots users and only specified directories are writable - This fixes "No such file" errors when SFTP tests try to create directories Co-authored-by: Menelion <595597+Menelion@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Menelion <595597+Menelion@users.noreply.github.com> * Fix WebDAV GetRelativePath to handle full URLs from server responses (#36) * Initial plan * Fix WebDavStorage GetRelativePath to correctly strip root path from WebDAV resource URLs Co-authored-by: Menelion <595597+Menelion@users.noreply.github.com> * Fix WebDavStorage GetRelativePath to handle full URLs from WebDAV server Co-authored-by: Menelion <595597+Menelion@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: Menelion <595597+Menelion@users.noreply.github.com> * Fix CS * Fix WebDAV CreateDirectoryAsync to ensure root path exists before creating subdirectories CreateDirectoryAsync was missing the call to EnsureRootPathExistsAsync that WriteFileAsync already had. This caused integration tests to fail because each test uses a unique root path (containing a GUID for isolation), and attempting to create subdirectories like "test/subdir" would fail with 409 Conflict when the root path itself didn't exist yet. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> * Remove garbage --------- Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com> Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
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.
WebDAV servers return full URLs (e.g.,
http://server:80/root/path/file.txt) in PROPFIND responses, butGetRelativePathwas only handling relative path strings, causingListItemsAsyncto fail.Changes:
GetRelativePathto detect and parse full URLs usingUri.TryCreateAbsolutePathcomponent and URL-decode it before stripping root pathExample:
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.