View Single Post
Old 08-25-2008, 02:40 PM   #3
mkaluza
Member
mkaluza began at the beginning.
 
Posts: 20
Karma: 27
Join Date: Jul 2008
Device: PRS-505
WARNING!!!

There's a catch. main.xml (or any other file) can't be modified when /Data/scripts directory is mounted. It causes file (and possibly whole internal flash filesystem) corruption.
So the test procedure is
- mount
- test
- umount
- modify

after mounting it's safe to reload using
ebook.setExitCode(3);
this.container.getWindow().doQuit();
but remember not to do it when unmounting, because it'll format internal memory then (/Data/scripts won't be mounted, so mkdosfs won't fail...) ;D
usb plug/unplug will do the trick

EDIT: actually the best thing to do is to place umount command in construct function in main.xml, so that it unmounts as soon as the file is loaded. Then connecting should be safe.

Last edited by mkaluza; 08-25-2008 at 02:43 PM.
mkaluza is offline   Reply With Quote