dat-desktop icon indicating copy to clipboard operation
dat-desktop copied to clipboard

Wrong reported dat size in download preview

Open beingalink opened this issue 7 years ago • 1 comments

From a dat I use privately:

Archive has 832 changes (puts: +422, dels: -410)
Current Size: 46 MB
Total Size:
- Metadata 90 KB
- Content 997 MB
Blocks:
- Metadata 833
- Content 15502

Dat-desktop reports the content size of 997 MB which is as I've been told the virtual(?) size of the content append only file. I think dat-desktop should report the current size (46 MB) which is what it actually will download in the end.

beingalink avatar Jun 01 '17 16:06 beingalink

Looks like size is getting set here: https://github.com/datproject/dat-desktop/blob/master/elements/table-row.js#L130-L132

If we use dat.stats.get().byteLength that'll reflect the latest size. Need to dig in a bit more later for where dat.stats get set, then I can PR.

joehand avatar Jun 01 '17 16:06 joehand