I think NVFS may not reorganize applications in the on-file-system file in
order to reduce the risk of corrupting an application.

Have you considered "copy the resources you want to a new DB, delete the old
one, rename the new one"?


thanks Ben, that did the job. Or at least a slight twist on it. Given that the issue is only with NVFS, it seemed appropriate to make full use of the hidden volume.

Must say though, it seems thorougly wierd for my app to be deleting itself from feature memory...

nvfsVol=NVFSVolRefNum();
if (nvfsVol)
        {
        UInt16                          cardNo;
        LocalID                         dbID;
        DmSearchStateType       searchInfo;
        Boolean                         tempCreated=false;
        
DmGetNextDatabaseByTypeCreator(true, &searchInfo, sysFileTApplication, launcherFileCreator, true, &cardNo, &dbID);
        error=VFSExportDatabaseToFile (nvfsVol,"/TempFile.prc",cardNo,dbID);
        if (!error)
                {
                tempCreated=true;
                error=DmDeleteDatabase (cardNo,dbID);
                if (!error)
{error=VFSImportDatabaseFromFile (nvfsVol,"/TempFile.prc",&cardNo,&dbID);
                        }
                else
                        {
                        Char    dispStr[10];
                        StrIToA(dispStr,error);
                        DisplayMessageForABitOutsideApp(dispStr,50);
                        }                       
                }
        if(tempCreated)
                {
                error=VFSFileDelete(nvfsVol,"/TempFile.prc");
                }
        }


--
Using Opera's revolutionary e-mail client: http://www.opera.com/m2/

--
For information on using the PalmSource Developer Forums, or to unsubscribe, 
please see http://www.palmos.com/dev/support/forums/

Reply via email to