hyperdrive-next icon indicating copy to clipboard operation
hyperdrive-next copied to clipboard

`drive.readdir` does not return both entry and prefix

Open josephmturner opened this issue 2 years ago • 1 comments

If a hyperdrive contains a path corresponding to both an entry (file) and a prefix (subdirectory), drive.readdir only returns the entry (file). https://github.com/RangerMauve/hypercore-fetch/issues/46 and https://github.com/RangerMauve/hypercore-fetch/pull/47 discuss this issue.

Per https://github.com/holepunchto/mirror-drive/issues/14, paths can potentially correspond to both an entry and a prefix. Therefore, when such a duplication exists, should drive.readdir return both values?

josephmturner avatar Jan 31 '23 17:01 josephmturner

If easy and no perf cost yea sure. Feel free to poke at that

mafintosh avatar Jan 31 '23 17:01 mafintosh