Ignore failed chown() because it always fails on vfat/samba. #345913

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@14452 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Christian Stimming 2006-06-27 09:10:29 +00:00
parent ed21dfe2f6
commit 5714500990
2 changed files with 11 additions and 6 deletions

View File

@ -1,3 +1,8 @@
2006-06-27 Christian Stimming <stimming@tuhh.de>
* src/backend/file/gnc-backend-file.c: Ignore failed chown()
because it always fails on vfat/samba. #345913
2006-06-26 David Hampton <hampton@employees.org>
* src/pixmaps/gnucash-icon.png:

View File

@ -519,18 +519,18 @@ gnc_file_be_write_to_file(FileBackend *fbe,
/* Use the permissions from the original data file */
if(chmod(tmp_name, statbuf.st_mode) != 0)
{
qof_backend_set_error(be, ERR_BACKEND_PERM);
/* FIXME: Even if the chmod did fail, the save
/* qof_backend_set_error(be, ERR_BACKEND_PERM); */
/* Even if the chmod did fail, the save
nevertheless completed successfully. It is
therefore wrong to signal the ERR_BACKEND_PERM
error here which implies that the saving itself
failed! What should we do? */
failed. Instead, we simply ignore this. */
PWARN("unable to chmod filename %s: %s",
tmp_name ? tmp_name : "(null)",
strerror(errno) ? strerror(errno) : "");
#if VFAT_DOESNT_SUCK /* chmod always fails on vfat fs */
g_free(tmp_name);
return FALSE;
#if VFAT_DOESNT_SUCK /* chmod always fails on vfat/samba fs */
/* g_free(tmp_name); */
/* return FALSE; */
#endif
}
#ifdef HAVE_CHOWN