Might there be a way to implement a custom VFS for Mac to deal with this?
On Thu, Dec 5, 2013 at 3:55 PM, William Garrison <1billgarri...@gmail.com>wrote: > On Thursday, December 5, 2013, L. Wood wrote: > > > A fact of reality: Documents can be moved by the program's users. > > > > The database should not be corruptible in this case. At most, I should > get > > errors from SQLite that I can handle gracefully. > > > > This is a normal thing. We are simply driving our car, or at most not > > stopping completely at a stop sign - not driving off a cliff. > > > > I agree that on a Mac, this is would not be a surprising event, ie user > moving/renaming a file at any time. > > Instead of trying to cope with this reality solely with SQLite API, you > might consider using other system services. > > For example, your app or document class could use fsevents to watch for > changes to your document package. When the user moves/renames your doc > folder, you can respond in some rationale manner. > > And don't make it a valid usage in your architecture to allow other > processes to access your SQLite db file directly--only through your > document class. > > You've highlighted a valid concern. SQLite isn't designed to deal with an > open db file being relocated. But Mac end users could do exactly this > without much thought. It's your job to code for this possibility. Use the > rest of the system to help you do that. > > Bill > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users