Skip to content

fix(memos-local-openclaw): normalize Windows paths when resolving better-sqlite3#1265

Open
hijzy wants to merge 1 commit intoMemTensor:openclaw-local-plugin-20260317from
hijzy:fix/windows-path-normalize
Open

fix(memos-local-openclaw): normalize Windows paths when resolving better-sqlite3#1265
hijzy wants to merge 1 commit intoMemTensor:openclaw-local-plugin-20260317from
hijzy:fix/windows-path-normalize

Conversation

@hijzy
Copy link
Collaborator

@hijzy hijzy commented Mar 17, 2026

Fixes #1192.

On Windows, the plugin incorrectly reported better-sqlite3 resolved outside plugin dir because of path format mismatches (C:\Users\... vs C:/Users/...).

Changes:

  • Use fileURLToPath(import.meta.url) instead of new URL().pathname
  • Add normalizeFsPath() to normalize both paths before comparison
  • Handles \ vs /, case sensitivity, and relative/absolute path differences

…ter-sqlite3

Use fileURLToPath(import.meta.url) instead of new URL().pathname for
correct platform path handling, and normalize both plugin dir and
resolved module path before comparison to avoid false negatives on
Windows where backslash vs forward-slash formats differ.

Fixes MemTensor#1192
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.

1 participant