AUDIT: r17726 - gnucash/trunk/src/backend/file - Bug #405472: Fix saving files opened over FUSE and sshfs

Christian Stimming cstim at cvs.gnucash.org
Wed Nov 26 16:23:31 EST 2008


Author: cstim
Date: 2008-11-26 16:23:30 -0500 (Wed, 26 Nov 2008)
New Revision: 17726
Trac: http://svn.gnucash.org/trac/changeset/17726

Modified:
   gnucash/trunk/src/backend/file/gnc-backend-file.c
Log:
Bug #405472: Fix saving files opened over FUSE and sshfs

This patch disables hardlinks on sshfs filesystems.

Patch by dhx <bugzilla at dhx.it>
BP

Modified: gnucash/trunk/src/backend/file/gnc-backend-file.c
===================================================================
--- gnucash/trunk/src/backend/file/gnc-backend-file.c	2008-11-26 21:17:30 UTC (rev 17725)
+++ gnucash/trunk/src/backend/file/gnc-backend-file.c	2008-11-26 21:23:30 UTC (rev 17726)
@@ -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
@@ -412,7 +412,7 @@
     if(err_ret != 0)
     {
 #ifdef HAVE_LINK
-        if(errno == EPERM
+        if(errno == EPERM || errno == ENOSYS
 # ifdef EOPNOTSUPP
            || errno == EOPNOTSUPP
 # endif
@@ -654,6 +654,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