[Etoys] Strange problem with file access

Bert Freudenberg bert at freudenbergs.de
Fri Jan 9 18:09:25 EST 2009

On 09.01.2009, at 23:52, Bert Freudenberg wrote:

> On 09.01.2009, at 20:59, Hilaire Fernandes wrote:
>> I am sugarizing iStoa, it comes with its own virtual machine and
>> image.
>> The image comes with Magma and I am conducting tests on the XO.
>> I see a strange behavior:
>> When I start iStoa from the Sugar application dock, I can not open  
>> the
>> Magma database from iStoa. It complains it cannot open the database
>> file. I try to follow what is happening from the debugger, and it
>> seems to be related to
>> StandardFileStream>>primOpen:writable:
>> FilePlugin?
>> However the path to the Magam databse file is fine and correct.
>> Now when I start iStoa from a terminal activity with the command:
>> ./Activities/iStoa.net.activity/bin/istoa.sh
>> I can open the database without problem.
>> The database is in ./Activities/iStoa.net.activity/resources/Magma
>> I am wondering: are there restrictions on file i/o when an activity  
>> is
>> started from the Sugar application dock?
> Yes. You cannot write in the activity bundle directory. An activity
> does not run as user olpc:
> http://wiki.laptop.org/go/Low-level_Activity_API

I meant to send a more specific URL:


Are you shipping iStoa with an initial database, or is is created on  
first run? If the latter, then create it not in the image directory  
but in the $SUGAR_ACTIVITY_ROOT/data directory. If the former, then  
copy the initial file to that writable directory when it does not  
exist (typically on first run).

If you want to integrate with the Journal then you would need to copy  
the database file into and out of the datastore.

- Bert -

More information about the Etoys mailing list