[Sugar-devel] moving datastore projects via usb sticks?

Erik Blankinship erikb at mediamods.com
Thu Dec 30 08:25:21 EST 2010


In my video game, I am saving game state resources into a tar file, which is
then saved to the journal / datastore.

Later in the game, a child can use an object chooser to select one of these
game states.  "Under the hood" we check if the datastore object file_path
ends with tar or gtar before we attempt to untar it and restore the game
state.

However, when one of these datastore entries is copied to a usb stick, a few
things happen which seem to make it impossible to re-open the copied files
on another machine running sugar.

First, the file is renamed to include a .gtar suffix.  This makes sense.

Next, when a child uses the object chooser to select this game state off of
the usb stick, debug traces reveal that the datastore object file_path does
*not* end in tar or gtar. (It is, instead, an apparent random gibberish
string).  Our algorithm, as is, does not try to untar files without first
finding the tar/gtar extension.

Is there a suggested method or best practice for making and then opening
datastore entries with lots of parts (hence, a tar file) which might migrate
via usb sticks?

Thanks,
Erik
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.sugarlabs.org/archive/sugar-devel/attachments/20101230/b748b175/attachment.html>


More information about the Sugar-devel mailing list