Commit dfd38b4
committed
Don't use urljoin for prepending a forward slash to paths.
Fixes #273.
Previously, `Path` used `urljoin` to prepend a forward slash to the
path. But `urljoin` is broken for no good reason:
>>> from urllib.parse import urljoin
>>> urljoin("/", "oh//no")
'/oh/no'
Fix this by just adding a "/" if it's not there, which is what this
was trying to do in the first place.1 parent 0dbd8c8 commit dfd38b4
2 files changed
+8
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
| |||
429 | 428 | | |
430 | 429 | | |
431 | 430 | | |
432 | | - | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
433 | 436 | | |
434 | 437 | | |
435 | 438 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
227 | 230 | | |
228 | 231 | | |
229 | 232 | | |
| |||
0 commit comments