holepunchto / hyperdrive

Hyperdrive is a secure, real time distributed file system
Apache License 2.0
1.86k stars 134 forks source link

Fix readdir / on windows #244

Closed RangerMauve closed 5 years ago

RangerMauve commented 5 years ago

Invoking readdir('/') before the metadata has loaded on Windows caused an error.

This is due to path.resolve('/', '/') returning C:\\ and unixify converting that to "" which makes name === '/' return false.

Using the posix path fixes this behavior.

Windows is weird. :P

t-mullen commented 4 years ago

path-browserify doesn't have path.posix, so this change broke hyperdrive in the browser.

256