Skip to content

Path Bug: Nested Windows Paths in WSL Environment #243

@calebpickerconsulting

Description

@calebpickerconsulting

Bug Description

When using Basic Memory in a WSL environment with a project that has a Windows-style path, Basic Memory creates incorrectly nested directory structures mixing Windows and Linux path formats.

Environment

  • OS: WSL2 (Windows Subsystem for Linux)
  • Basic Memory version: (latest as of July 31, 2025)
  • Project: shadow-ln
  • Expected path: /mnt/c/Users/Dr Brenda/basic-memory/housing/shadow-ln/

Steps to Reproduce

  1. Set up Basic Memory in WSL with a project pointing to a Windows path
  2. Switch to the project using switch_project("shadow-ln")
  3. Create a note using write_note() with folder parameter "legal-research"
  4. Check the file system for the created file

Expected Behavior

Files should be created at:

/mnt/c/Users/Dr Brenda/basic-memory/housing/shadow-ln/legal-research/filename.md

Actual Behavior

Files are created at a nested path combining Windows and Linux formats:

/mnt/c/Users/Dr Brenda/basic-memory/C:\Users\Dr Brenda\basic-memory\housing\shadow-ln/legal-research/filename.md

Note the incorrect nesting: /mnt/c/Users/Dr Brenda/basic-memory/C:\Users\...

Impact

  • Files are not created in the expected location
  • Breaks integration with other tools expecting standard file paths
  • Creates confusion about where files are actually stored
  • sync_status reports everything is fine even though files are in wrong location

Workaround

Manually move files from the nested path to the correct location:

mv "/mnt/c/Users/Dr Brenda/basic-memory/C:\Users\Dr Brenda\basic-memory\housing\shadow-ln/legal-research/"*.md /mnt/c/Users/Dr\ Brenda/basic-memory/housing/shadow-ln/legal-research/

Additional Notes

  • The list_directory command shows files in the expected structure, but the actual file system has them in the nested path
  • This appears to be a path resolution issue when Basic Memory handles Windows-style paths in a WSL environment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions