diff --git a/cmd/cmount/fs.go b/cmd/cmount/fs.go index c4f0d6d65..6b51fd0cf 100644 --- a/cmd/cmount/fs.go +++ b/cmd/cmount/fs.go @@ -538,11 +538,11 @@ func translateError(err error) (errc int) { switch errors.Cause(err) { case vfs.OK: return 0 - case vfs.ENOENT: + case vfs.ENOENT, fs.ErrorDirNotFound, fs.ErrorObjectNotFound: return -fuse.ENOENT - case vfs.EEXIST: + case vfs.EEXIST, fs.ErrorDirExists: return -fuse.EEXIST - case vfs.EPERM: + case vfs.EPERM, fs.ErrorPermissionDenied: return -fuse.EPERM case vfs.ECLOSED: return -fuse.EBADF @@ -554,7 +554,7 @@ func translateError(err error) (errc int) { return -fuse.EBADF case vfs.EROFS: return -fuse.EROFS - case vfs.ENOSYS: + case vfs.ENOSYS, fs.ErrorNotImplemented: return -fuse.ENOSYS case vfs.EINVAL: return -fuse.EINVAL diff --git a/cmd/mount/fs.go b/cmd/mount/fs.go index 016e97eac..0292db99b 100644 --- a/cmd/mount/fs.go +++ b/cmd/mount/fs.go @@ -77,11 +77,11 @@ func translateError(err error) error { switch errors.Cause(err) { case vfs.OK: return nil - case vfs.ENOENT: + case vfs.ENOENT, fs.ErrorDirNotFound, fs.ErrorObjectNotFound: return fuse.ENOENT - case vfs.EEXIST: + case vfs.EEXIST, fs.ErrorDirExists: return fuse.EEXIST - case vfs.EPERM: + case vfs.EPERM, fs.ErrorPermissionDenied: return fuse.EPERM case vfs.ECLOSED: return fuse.Errno(syscall.EBADF) @@ -93,7 +93,7 @@ func translateError(err error) error { return fuse.Errno(syscall.EBADF) case vfs.EROFS: return fuse.Errno(syscall.EROFS) - case vfs.ENOSYS: + case vfs.ENOSYS, fs.ErrorNotImplemented: return fuse.ENOSYS case vfs.EINVAL: return fuse.Errno(syscall.EINVAL) diff --git a/cmd/mount2/fs.go b/cmd/mount2/fs.go index f672b48b5..0a24580e9 100644 --- a/cmd/mount2/fs.go +++ b/cmd/mount2/fs.go @@ -105,11 +105,11 @@ func translateError(err error) syscall.Errno { switch errors.Cause(err) { case vfs.OK: return 0 - case vfs.ENOENT: + case vfs.ENOENT, fs.ErrorDirNotFound, fs.ErrorObjectNotFound: return syscall.ENOENT - case vfs.EEXIST: + case vfs.EEXIST, fs.ErrorDirExists: return syscall.EEXIST - case vfs.EPERM: + case vfs.EPERM, fs.ErrorPermissionDenied: return syscall.EPERM case vfs.ECLOSED: return syscall.EBADF @@ -121,7 +121,7 @@ func translateError(err error) syscall.Errno { return syscall.EBADF case vfs.EROFS: return syscall.EROFS - case vfs.ENOSYS: + case vfs.ENOSYS, fs.ErrorNotImplemented: return syscall.ENOSYS case vfs.EINVAL: return syscall.EINVAL