10-08-2012 05:17 PM
So i'm saving some info into the application data folder. I notice that when I delete the app or install a new release the data that was saved before is deleted.
Does the PB delete the entire folder before it installs a new release?
I'm using the following
fopen("data/mystuff.dat", "w")
10-08-2012 06:02 PM
If you're just doing a regular update, either from App World or with blackberry-deploy, then it will not delete the data.
If you're using Momentics to update, then it may delete the data folder when you update, depending on your settings.
The fopen() call you show is also overwriting any previous data, so perhaps that's all you're seeing. Not really sure what you're expecting when you're using "w" but worried about deleting old data... that's what it does.
10-09-2012 04:10 AM
I note that when I delete an application using the PB navigator, all the data in the data directory is deleted. In fact, I think the whole application directory structure is deleted. This is as I would expect -- there is no way for the user to tidy up this area of the filesystem, and it wouldn't be good to have unreachable data lurking around.
Repeated uses of backberry-deploy don't cause the old application to be explicitly deleted, and so the data remains. I think this is a bit of a gotcha for developers -- when you redeploy, you aren't necessarily seeing the application as it would be seen by end users, because there could be old data in the application's directory from previous tests. It's simple enough to delete the application first, if you remember ![]()
10-09-2012 09:56 AM