Skip to content

Fix: Resolve import globs safely on Windows paths#225

Merged
taylortom merged 1 commit into
masterfrom
fix/windows-glob-paths
Jul 1, 2026
Merged

Fix: Resolve import globs safely on Windows paths#225
taylortom merged 1 commit into
masterfrom
fix/windows-glob-paths

Conversation

@taylortom

Copy link
Copy Markdown
Contributor

Fix

  • AdaptFrameworkImport built several glob patterns by interpolating a filesystem path (this.path / this.langPath) directly into the pattern string. On Windows the \ separators are interpreted as glob escape characters (and any glob-significant character in the path — [, (, * — breaks matching on every platform), so course directories, assets and plugins fail to resolve during import. Each path is now passed via the cwd option with a relative forward-slash pattern and absolute: true, posix: true (consistent with this file's /-based path handling and the already-safe cwd globs elsewhere in it).
    • prepare() — course directory discovery
    • loadAssetData() — asset metadata and manual asset listing
    • loadPluginData() — used content plugins
    • importCourseAssets() — asset file lookup

Testing

  • Added a loadAssetData() test that drives the method with a course path containing glob-significant characters ([id]); it fails without the fix on all platforms.

@taylortom
taylortom merged commit 95403b7 into master Jul 1, 2026
2 checks passed
@taylortom
taylortom deleted the fix/windows-glob-paths branch July 1, 2026 20:17
github-actions Bot pushed a commit that referenced this pull request Jul 1, 2026
## [3.4.2](v3.4.1...v3.4.2) (2026-07-01)

### Fix

* Resolve import globs safely on Windows paths (#225) ([95403b7](95403b7)), closes [#225](#225)
@github-actions

github-actions Bot commented Jul 1, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 3.4.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant