Patch: preserve file permissions

Matt Brubeck mbrubeck@cs.hmc.edu
Tue, 16 Jul 2002 10:40:03 -0700 (PDT)


Hi!  I recently started using GnuCash, and I've found it very friendly and
useful.  My thanks to all the developers.

I have a patch for one minor issue that was annoying me.  I set my GnuCash
data file to be group-readable, so that several accounts on my system can
access it.  But whenever I open and then save the file in GnuCash, the
permissions are reset to my umask (because GnuCash actually writes a new
temp file, then links it to the original location).

The attached patch makes GnuCash remember the original file permissions when
available, and preserve them in the newly saved file.