Commit de5acdc
authored
fix: normalizing a relative path returns an absolute path (#251)
* path: fix for normalizing files including ...
This still doesn't work for paths containing both .. parts as well as
...
* Use path.sep instead of hard coded /
* Change tests to check relative paths
* Add check for absolute path
* Linting fixes
* Update _normalize_path to check initial .. parts
This should return an absolute path if the initial .. count matches the
number of parts in the cwd (Path:_cwd)1 parent 901b96d commit de5acdc
2 files changed
Lines changed: 49 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
76 | 76 | | |
77 | 77 | | |
78 | 78 | | |
79 | | - | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
80 | 87 | | |
81 | 88 | | |
82 | 89 | | |
83 | 90 | | |
84 | 91 | | |
85 | 92 | | |
86 | | - | |
| 93 | + | |
87 | 94 | | |
88 | 95 | | |
89 | 96 | | |
90 | 97 | | |
91 | 98 | | |
| 99 | + | |
| 100 | + | |
92 | 101 | | |
93 | 102 | | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
94 | 106 | | |
95 | 107 | | |
96 | | - | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
97 | 113 | | |
98 | 114 | | |
99 | 115 | | |
100 | 116 | | |
101 | | - | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
102 | 123 | | |
103 | 124 | | |
104 | 125 | | |
| |||
251 | 272 | | |
252 | 273 | | |
253 | 274 | | |
254 | | - | |
| 275 | + | |
255 | 276 | | |
256 | | - | |
| 277 | + | |
257 | 278 | | |
258 | 279 | | |
259 | 280 | | |
| |||
321 | 342 | | |
322 | 343 | | |
323 | 344 | | |
324 | | - | |
| 345 | + | |
325 | 346 | | |
326 | 347 | | |
327 | 348 | | |
| |||
532 | 553 | | |
533 | 554 | | |
534 | 555 | | |
535 | | - | |
536 | | - | |
537 | | - | |
538 | | - | |
| 556 | + | |
539 | 557 | | |
540 | 558 | | |
541 | 559 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
185 | 185 | | |
186 | 186 | | |
187 | 187 | | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
188 | 208 | | |
189 | 209 | | |
190 | 210 | | |
| |||
0 commit comments