mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Bug #405472: Fix saving files opened over FUSE and sshfs
This patch disables hardlinks on sshfs filesystems. Patch by dhx <bugzilla@dhx.it> BP git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@17726 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
parent
8cecfea8da
commit
3fbbde7215
@ -144,7 +144,7 @@ gnc_file_be_get_file_lock (FileBackend *be)
|
|||||||
if (rc)
|
if (rc)
|
||||||
{
|
{
|
||||||
/* If hard links aren't supported, just allow the lock. */
|
/* If hard links aren't supported, just allow the lock. */
|
||||||
if (errno == EPERM
|
if (errno == EPERM || errno == ENOSYS
|
||||||
# ifdef EOPNOTSUPP
|
# ifdef EOPNOTSUPP
|
||||||
|| errno == EOPNOTSUPP
|
|| errno == EOPNOTSUPP
|
||||||
# endif
|
# endif
|
||||||
@ -412,7 +412,7 @@ gnc_int_link_or_make_backup(FileBackend *be, const char *orig, const char *bkup)
|
|||||||
if(err_ret != 0)
|
if(err_ret != 0)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_LINK
|
#ifdef HAVE_LINK
|
||||||
if(errno == EPERM
|
if(errno == EPERM || errno == ENOSYS
|
||||||
# ifdef EOPNOTSUPP
|
# ifdef EOPNOTSUPP
|
||||||
|| errno == EOPNOTSUPP
|
|| errno == EOPNOTSUPP
|
||||||
# endif
|
# endif
|
||||||
@ -654,6 +654,7 @@ gnc_file_be_write_to_file(FileBackend *fbe,
|
|||||||
case ENOENT: /* tmp_name doesn't exist? Assume "RO" error */
|
case ENOENT: /* tmp_name doesn't exist? Assume "RO" error */
|
||||||
case EACCES:
|
case EACCES:
|
||||||
case EPERM:
|
case EPERM:
|
||||||
|
case ENOSYS:
|
||||||
case EROFS:
|
case EROFS:
|
||||||
be_err = ERR_BACKEND_READONLY;
|
be_err = ERR_BACKEND_READONLY;
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user