Workaround for #8155? (hard links in datastore for storing duplicate files)
Marco Pesenti Gritti
mpgritti at gmail.com
Fri Oct 10 07:58:39 EDT 2008
2008/10/10 Emiliano Pastorino <epastorino at plan.ceibal.edu.uy>:
> Hi, everyone.
> We would like to create a collection of books in pdf format (collection as
> in http://wiki.laptop.org/go/Collections) for kids in Uruguay, but we've
> seen that each time you open a book, a duplicate is created in datastore,
> despite the file being stored locally. That happens in build 656, but I've
> tried the same in 767, and duplicates are still being created.
> I've found that ticket #8155 describes this defect, but it seems that there
> hasn't been any advance since it was created 7 weeks ago.
> We need to solve this asap, so any workaround is good for us (it doesn't
> need to be pretty at all).
I can think of a couple of possible solutions.
1 Open the pdf directly in Browse. We have code for it already, see
this thread http://lists.laptop.org/pipermail/sugar/2008-October/008946.html
2 Browse could be smart and when opening files from the local file
system, it could hard link them in the DS instead of making a copy. It
means that if the original file changes, the one in the journal will
change too, but I can't think of very bad consequences of this.
More information about the Devel