RangerMauve / hypercore-fetch

Implementation of Fetch that uses the Hyper SDK for loading p2p content
MIT License
36 stars 12 forks source link

Possible to have file and dir with same name? #40

Closed josephmturner closed 1 year ago

josephmturner commented 1 year ago

It appears that it's possible to create a file and directory with the same name, only distinguished by a trailing slash. Is this expected?

josephmturner commented 1 year ago

Also opened here: https://github.com/holepunchto/hyperdrive-next/issues/29

RangerMauve commented 1 year ago

Yeah, this is a function of Hyperdrive and I'd rather defer to their judgement. If they make an update that changes that, we'll combine it here.

Only thing is that technically "folders" don't exist in the new Hyperdrive since it uses prefixes over "entries".

So you might have an entry within a folder name that happens to be the name of another entry.

e.g. with this setup

/foo => 'Hello World'
/foo/bar.txt => 'Hello World'

/foo would be both a folder and a file.