Skip to content

Conversation

@vanmarkic
Copy link

Summary

  • Fixes 404 errors caused by double slashes in file paths
  • Normalizes directory paths to ensure consistent formatting
  • Includes comprehensive test coverage

Changes

  • Implemented path normalization to remove trailing slashes from directories
  • Added 120 lines of tests for various path normalization scenarios
  • Prevents double slashes when constructing API URLs

Related Issue

Fixes bug #37

🤖 Generated with Claude Code

…cksteamdev#37)

When querying the list_vault_files endpoint with a directory parameter containing a trailing slash (e.g., "DevOps/"), the system would generate paths with double slashes (e.g., "/vault/DevOps//"), resulting in HTTP 404 errors.

This fix adds path normalization that strips trailing slashes before constructing the API path, ensuring consistent behavior regardless of whether users include trailing slashes in directory parameters.

Fixes jacksteamdev#37
- Test removal of single and multiple trailing slashes
- Test handling of paths without trailing slashes
- Test empty and undefined directory inputs
- Test nested paths with various trailing slash scenarios
- Test API path construction prevents double slashes
- Verify the fix for /vault//Documents/ bug
@netlify
Copy link

netlify bot commented Nov 15, 2025

Deploy Preview for superb-starlight-b5acb5 canceled.

Name Link
🔨 Latest commit b1ee5e9
🔍 Latest deploy log https://app.netlify.com/projects/superb-starlight-b5acb5/deploys/6918c1b4f0ab490008454dc6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants