01/27/2010, 10:18 AM
|
#1 (permalink) |
|
Member
![]() Join Date: Jul 2009
Posts: 44
Likes Received: 0
Thanks: 0
Thanked 6 Times in 6 Posts
|
I am not sure if you will call this a bug or a feature. And you may not be able to do anything about it. But I hope so.
If a create a file on the virtual card using VFS calls, even if I close the file and even if I exit my app back to the Classic app launcher, the file shows up as zero bytes in USB drive mode unless I first exit Classic. That is, try these steps: 1) Create a file using VFS (ie on the "Virtual Card") 2) Close the file 3) Optionally exit the palm application which created the file 4) Attach the USB cable and select USB Drive mode 5) Open the ClassicApps folder and look for the file created It will be there, but with a file size of zero bytes. If have found two work-arounds: 1) Exit Classic prior to attaching USB cable, or 2) Remove USB, attach a second time, and enter USB drive mode again It seems like removing the USB cable gives Classic time to shut down and exit, so the second time you enter drive mode the file has the correct size. I don't know if this is a case of webOS pre-empting Classic and not giving it a chance to close its calls to the filesystem, or if there is any notification you can get prior to USB drive mode starting. If there is no notification, is is possible for Classic to somehow flush its file buffers or whatever after a VFS file has been closed? Some of my apps use the memory card (or Virtual card in the case of Classic) to exchange data with a desktop app. And the files are showing up as zero bytes unless Classic is exited or USB drive mode entered twice. |
01/28/2010, 09:30 AM
|
#2 (permalink) |
|
webOS Developer
![]() Join Date: Jul 2009
Posts: 350
Likes Received: 0
Thanks: 162
Thanked 70 Times in 43 Posts
|
Well, this is neither a bug nor a feature, at least as far as Classic is concerned.
This is the way USB Drive mode works, Classic cannot alter it. It seems as if USB Drive mode needs some time to "get together", and your workaround to exit and then go back "helps it". |
01/28/2010, 10:27 AM
|
#3 (permalink) | |
|
Member
![]() Join Date: Jul 2009
Posts: 44
Likes Received: 0
Thanks: 0
Thanked 6 Times in 6 Posts
|
Quote:
![]() Experimenting more, it seems it is not necessary to completely leave Classic. If I create a file via VFS calls then switch tasks to Internalz, the filesizes are already updated. So it appears webOS flushes out the contents prior to switching foreground tasks, but not before going into USB drive mode. But it isn't like I can easily train users to do that either. So I guess I just need to update my desktop apps to look for zero byte files under ClassicApps, then issue a message asking them to remove the cable and go back into USB drive mode again. |
|
01/29/2010, 08:36 AM
|
#5 (permalink) | |
|
Member
![]() Join Date: Jul 2009
Posts: 44
Likes Received: 0
Thanks: 0
Thanked 6 Times in 6 Posts
|
Quote:
I also plan to change my desktop apps, which now look for the ClassicApps folder off the root of a removable drive, to check if any file size is zero bytes. If it it and \ClassicApps exists, I will do a dialog asking them to remove and re-insert the USB cable. Not as good as having the file system updated the first time, but at least should avoid support requests. Maybe.
|
|
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|



