On Thu, Jun 22, 2000 at 01:40:30AM -0700, Dave Peticolas wrote:
> > Probably the temporary files should be in /tmp or /usr/tmp and contain
> > the process number.
> 
> If we put them in /tmp, then we really need to use something like
> mkstemp(char *template) to get a unique name. But I'm not sure we
> should put them there. First, if there is an error moving them, it's
> easier to find them if we use the same directory (after all, they
> should still have good data). Also, I was hoping to use the 'rename'
> system call to make things simple (and usually atomic), but rename
> doesn't work across different filesystems.

OK, good points.  What happens in the case when the file is writeable
but the directory is not?  What if the names you want to use are
already taken, and the files are not writeable?  (Example case: the
distribution of gnucash comes with sample files, and a user wants to
be able to try gnucash on these files without copying them to another
directory.)

It might be good to keep files in the same directory as much as
possible, picking another name if necessary.  I think Emacs handles
all these cases pretty well; it might be worth looking at how it does
it.  (But it might also be worth implementing _something_ first.)

--Dylan Thurston

--
Gnucash Developer's List
To unsubscribe send empty email to: [EMAIL PROTECTED]


Reply via email to