fix: Remove duplicate path segments after symlink resolution (#36)#52
Open
vanmarkic wants to merge 3 commits intojacksteamdev:mainfrom
Open
Conversation
…amdev#36) The MCP server installation was creating paths with duplicate segments (e.g., /home/user/home/user/vault) when resolving symlinks. This occurred because the symlink resolution process would replace the entire path with the resolved path, potentially including duplicate segments. This fix adds a removeDuplicatePathSegments function that: - Detects and removes consecutive duplicate path segment sequences - Works with both POSIX and Windows paths - Handles complex cases like /home/user/home/user/vault -> /home/user/vault The function is applied after all symlink resolution to ensure paths are normalized correctly. Fixes jacksteamdev#36
…ksteamdev#36) - Test simple duplicate removal (/home/user/home/user -> /home/user) - Test multiple consecutive duplicates - Test complex duplicate patterns - Test preservation of non-duplicate paths - Test Windows-style paths with duplicates - Test iCloud Drive duplicate paths - Test root directory handling - Test paths with similar but non-duplicate segments
…dev#36) - Fix bug where path.join() with empty first element drops leading slash - Handle special case for root directory (/) - Handle empty normalized arrays - Update test function to match implementation - All tests now pass
✅ Deploy Preview for superb-starlight-b5acb5 canceled.
|
4 tasks
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.
Summary
Changes
removeDuplicatePathSegmentsfunction to clean resolved pathsRelated Issue
Fixes bug #36
🤖 Generated with Claude Code