datBase icon indicating copy to clipboard operation
datBase copied to clipboard

Sub-directory listings only display one file

Open da2x opened this issue 7 years ago • 6 comments

All of these directories contains files that datBase doesn’t display in directory listings. You can navigate to the files directly (/poster.jpeg will work for all the below examples) and datBase will show the file.

https://datbase.org/dat://0f9840c371387d372148484fb622038758a197781723b5e1d034e7f6f4daf643/contents/instapaper-scrolling-android https://datbase.org/dat://0f9840c371387d372148484fb622038758a197781723b5e1d034e7f6f4daf643/contents/microsoft-todo-scrolling-android https://datbase.org/dat://0f9840c371387d372148484fb622038758a197781723b5e1d034e7f6f4daf643/contents/spideroak-one-checkbox

da2x avatar Nov 04 '18 01:11 da2x

I am experiencing this issue as well. Here are two repositories:

In EPS and Sales Estimates, eps-estimate/2019-02-17.csv is visible, but none of the other files are. However, the other files are still accessible. 2019-02-10.csv is an example of a file that is available to download but is not visible on datbase.org.

I discussed this with martinheidegger on IRC and we went over making sure the files were being properly hosted by dat share. martinheidegger posted the following:

Hmm, its kind-of tricky to pinpoint the error here. As far as I read https://github.com/mafintosh/hypercore-archiver/blob/master/index.js#L253-L260 is where the replication magic happens. All cores are sparse: https://github.com/mafintosh/hypercore-archiver/blob/master/index.js#L362 - This means that the file tree also will be replicated sparsely. (it requests the files as the user requests files.

Is someone able to take a look at what's going on here?

evdubs avatar Feb 21 '19 22:02 evdubs

Another affected repository: https://datbase.org/dat://e71784fbaaac13e7a1b20ba39d8149b2ba893171204672575eab8b4fd0758ec3/contents/1382

da2x avatar Apr 10 '19 21:04 da2x

Also, using http://ranger.mauve.moe/dat-js-example, we can see the repository does have more than one file in a subdirectory.

evdubs avatar Apr 10 '19 23:04 evdubs

OK, after some digging I found the problem. Directory listings only show files added in the latest revision that added any files to the directory. It doesn't show files that were already there. You can see this here: https://datbase.org/dat://e71784fbaaac13e7a1b20ba39d8149b2ba893171204672575eab8b4fd0758ec3/contents/1388

da2x avatar Apr 11 '19 12:04 da2x

Would like to have some discussions with @RangerMauve on how we can strip down datbase's interface (take the css/design) and plug in dat-js-example behind so we can remove these bugs. Datbase's code has gotten a bit stale at this point and could use a refresh. Thanks for finding these things!

okdistribute avatar Apr 11 '19 16:04 okdistribute

Yeah, I think we could get pretty far with the stuff I've been playing around with in load-dat-page

RangerMauve avatar Apr 12 '19 12:04 RangerMauve