On Mon, Nov 11, 2013 at 3:01 PM, L. Wood <lwoo...@live.com> wrote:

> * The program runs in sandbox mode (a requirement for all programs on
> Apple's Mac App Store), meaning that if a user moves a package, the program
> will gain read/write access to the new path but LOSE read/write access to
> the old path.
>
> This poses a problem:
>
> * A user could move the file during a transaction, i.e., between
> _prepare_v2(); and _finalize();
>

If the app is sandboxed, how does the user possibly get a chance to move
the files?


>
> It seems that SQLite needs support for this situation. Would you agree?
>

FWIW, i don't. Until you asked about this last week i had never heard of a
use case where any app needs to account for its data files being moved
while it is running.

Also note that moving works differently depending on whether the move is
across the same device or not. If it's on the same device it's just a
rename and the inode stays the same. If it's across devices then it's
basically a copy+delete.


> Until then, I guess I just have to live with the risk of either an error
> or data corruption when a user moves a document (a package).
>

How about telling your users that moving the data files while the app is
using them is "not supported"? i would think that this goes without saying,
but maybe some users need it to be explicit.

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
http://gplus.to/sgbeal
"Since tyranny's the only guaranteed byproduct of those who insist on a
perfect world, freedom will have to do." -- Bigby Wolf
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to