From 1be287244299a95bc1b60d7b72ff2314a0c03765 Mon Sep 17 00:00:00 2001 From: Chaiwat Suttipongsakul Date: Wed, 7 Feb 2018 11:44:18 +0700 Subject: [PATCH 1/2] fix missing import --- gdrivefs/gdfuse.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gdrivefs/gdfuse.py b/gdrivefs/gdfuse.py index ff6df20..38f985e 100644 --- a/gdrivefs/gdfuse.py +++ b/gdrivefs/gdfuse.py @@ -9,7 +9,7 @@ import pprint import math -from errno import ENOENT, EIO, ENOTDIR, ENOTEMPTY, EPERM, EEXIST +from errno import ENOENT, EIO, EISDIR, ENOTDIR, ENOTEMPTY, EPERM, EEXIST from fuse import FUSE, Operations, FuseOSError, c_statvfs, fuse_get_context, \ LoggingMixIn from time import mktime, time @@ -697,7 +697,7 @@ def unlink(self, file_path): _logger.error("Can not unlink() directory [%s] with ID [%s]. " "Must be file.", file_path, entry_id) - raise FuseOSError(errno.EISDIR) + raise FuseOSError(EISDIR) # Remove online. Complements local removal (if not found locally, a # follow-up request checks online). From acd42fed74225aef6a6515653bb5d57b6a1042af Mon Sep 17 00:00:00 2001 From: Chaiwat Suttipongsakul Date: Wed, 7 Feb 2018 11:46:43 +0700 Subject: [PATCH 2/2] ignore system mount options --- gdrivefs/gdfuse.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gdrivefs/gdfuse.py b/gdrivefs/gdfuse.py index 38f985e..4a20141 100644 --- a/gdrivefs/gdfuse.py +++ b/gdrivefs/gdfuse.py @@ -839,7 +839,8 @@ def mount(auth_storage_filepath, mountpoint, debug=None, nothreads=None, _logger.debug("Forwarding option [%s] with value [%s] to " "FUSE.", k, v) - fuse_opts[k] = v + if k not in ('user', '_netdev'): + fuse_opts[k] = v if gdrivefs.config.IS_DEBUG is True: _logger.debug("FUSE options:\n%s", pprint.pformat(fuse_opts))