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
_______________________________________________
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel

Reply via email to