Commit 15199f8
authored
fix: path normalization works with esoteric usernames (#290)
* fix: path normalization works with esoteric usernames
Usernames with dashes at the end are perfectly valid unix user names,
but they're seen as a regular expression pattern in Lua. Switch to using
string.find instead of string.gsub to avoid the pattern matching issue.
* Fix syntax error
Using end here is no good, even though it worked in the luajit repl. 😆
* Fix typo in spec name
* Clean the path we send to _normalize_path
Also fix the specs to match the new behavior.1 parent 78dde9b commit 15199f8
2 files changed
Lines changed: 16 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
347 | 347 | | |
348 | 348 | | |
349 | 349 | | |
350 | | - | |
351 | | - | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
352 | 356 | | |
353 | | - | |
| 357 | + | |
354 | 358 | | |
355 | 359 | | |
356 | 360 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
212 | 212 | | |
213 | 213 | | |
214 | 214 | | |
215 | | - | |
| 215 | + | |
216 | 216 | | |
217 | 217 | | |
218 | 218 | | |
| |||
227 | 227 | | |
228 | 228 | | |
229 | 229 | | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
230 | 238 | | |
231 | 239 | | |
232 | 240 | | |
| |||
0 commit comments