mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Maintain group id when saving file.
git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8814 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
2003-07-01 David Hampton <hampton@employees.org>
|
||||
|
||||
* src/backend/file/gnc-backend-file.c: New data file should have
|
||||
same uid/gidas original file. #105662
|
||||
|
||||
* src/app-utils/gnc-ui-util.[ch]:
|
||||
* src/app-utils/gw-app-utils-spec.scm:
|
||||
* src/engine/gnc-commodity.[ch]:
|
||||
|
||||
@@ -680,6 +680,14 @@ gnc_file_be_write_to_file(FileBackend *be, gboolean make_backup)
|
||||
g_free(tmp_name);
|
||||
return FALSE;
|
||||
}
|
||||
if(chown(tmp_name, statbuf.st_uid, statbuf.st_gid) != 0)
|
||||
{
|
||||
PWARN("unable to chown filename %s: %s",
|
||||
datafile ? datafile : "(null)",
|
||||
strerror(errno) ? strerror(errno) : "");
|
||||
g_free(tmp_name);
|
||||
return FALSE;
|
||||
}
|
||||
}
|
||||
if(unlink(datafile) != 0 && errno != ENOENT)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user