Commit 8e5f04a
authored
fix: should handle ./ relative path (#109)
We have a tgz its entry path is `./foo/bar`, and when invoke
`stripFileName(1, './foo/bar')`, it always return `foo/bar`, actually,
we expect it to return `bar`
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
- **Bug Fixes**
- Improved handling of file paths to ensure consistent formatting across
different operating systems.
- **Tests**
- Added new test cases to verify correct behavior when normalizing and
stripping relative file paths.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: jiacheng.li <[email protected]>1 parent d173d2d commit 8e5f04a
2 files changed
+17
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
171 | 178 | | |
172 | 179 | | |
173 | 180 | | |
| |||
189 | 196 | | |
190 | 197 | | |
191 | 198 | | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
192 | 205 | | |
193 | 206 | | |
194 | 207 | | |
195 | 208 | | |
196 | 209 | | |
197 | 210 | | |
198 | | - | |
199 | | - | |
200 | | - | |
201 | 211 | | |
202 | 212 | | |
203 | 213 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
52 | 52 | | |
53 | 53 | | |
54 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
55 | 59 | | |
56 | 60 | | |
57 | 61 | | |
| |||
0 commit comments