r17755 - gnucash/branches/2.2/src/backend/file - [17726] Bug #405472: Fix saving files opened over FUSE and sshfs

Christian Stimming cstim at cvs.gnucash.org
Sat Dec 6 17:07:16 EST 2008


Author: cstim
Date: 2008-12-06 17:07:16 -0500 (Sat, 06 Dec 2008)
New Revision: 17755
Trac: http://svn.gnucash.org/trac/changeset/17755

Modified:
   gnucash/branches/2.2/src/backend/file/gnc-backend-file.c
Log:
[17726] Bug #405472: Fix saving files opened over FUSE and sshfs

This patch disables hardlinks on sshfs filesystems.

Patch by dhx <bugzilla at dhx.it>

Modified: gnucash/branches/2.2/src/backend/file/gnc-backend-file.c
===================================================================
--- gnucash/branches/2.2/src/backend/file/gnc-backend-file.c	2008-12-06 22:07:08 UTC (rev 17754)
+++ gnucash/branches/2.2/src/backend/file/gnc-backend-file.c	2008-12-06 22:07:16 UTC (rev 17755)
@@ -144,7 +144,7 @@
     if (rc)
     {
         /* If hard links aren't supported, just allow the lock. */
-        if (errno == EPERM
+        if (errno == EPERM || errno == ENOSYS
 # ifdef EOPNOTSUPP
             || errno == EOPNOTSUPP
 # endif
@@ -411,7 +411,7 @@
     if(err_ret != 0)
     {
 #ifdef HAVE_LINK
-        if(errno == EPERM
+        if(errno == EPERM || errno == ENOSYS
 # ifdef EOPNOTSUPP
            || errno == EOPNOTSUPP
 # endif
@@ -647,6 +647,7 @@
             case ENOENT:     /* tmp_name doesn't exist?  Assume "RO" error */
             case EACCES:
             case EPERM:
+            case ENOSYS:
             case EROFS:
               be_err = ERR_BACKEND_READONLY;
               break;



More information about the gnucash-changes mailing list