`relative` judgment error in win32 when `from` and `to` in different disk
peterroe opened this issue · comments
lsh commented
Environment
Node: 16
pathe: 1.1.1
Reproduction
import pathe from 'pathe'
import path from 'path'
pathe.relative("C:\\foo", "D:\\bar") // => ../../D:/bar
path.relative("C:\\foo", "D:\\bar") //=> D:\bar
Describe the bug
function relative(from, to) {
//...
}
When the paths from
and to
are on different disks, the return value should be the value of to
.
Additional context
No response
Logs
No response