Commit 9c7657b
Fix script path truncation by centralizing relative path computation
The old code computed relative paths by doing string arithmetic with
dropFirst(extensionsPathString.count + 1), but extensionsPathString
came from URL.appendingPathComponent("./commands") which preserved the
literal "./" — making it 2 chars longer than the actual resolved file
paths from FileManager. Every script path was silently truncated
(system/ → stem/, apps/ → ps/, etc.) for all 851 scripts.
Replace both callsites with a new URL.relativePath(from:) helper that
standardizes both sides before computing the relative path, eliminating
the mismatch entirely. extensionsPathString is no longer needed and
is removed.
Also regenerates commands/extensions.json and commands/README.md with
correct paths.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent b78006c commit 9c7657b
5 files changed
Lines changed: 20181 additions & 20171 deletions
File tree
- Tools/Toolkit/Sources/ToolkitLibrary
- Core
- Stores
- Toolkit
- Extensions/URL
- commands
Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | 25 | | |
30 | 26 | | |
31 | 27 | | |
| |||
Lines changed: 2 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
81 | | - | |
82 | | - | |
| 81 | + | |
83 | 82 | | |
84 | 83 | | |
85 | 84 | | |
| |||
147 | 146 | | |
148 | 147 | | |
149 | 148 | | |
150 | | - | |
151 | | - | |
152 | | - | |
| 149 | + | |
153 | 150 | | |
154 | 151 | | |
155 | 152 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
38 | 48 | | |
39 | 49 | | |
40 | 50 | | |
| |||
0 commit comments