From 07c40780b3b49a2a0f0031813b2fb1fe16504e9b Mon Sep 17 00:00:00 2001 From: albertony <12441419+albertony@users.noreply.github.com> Date: Sun, 15 Nov 2020 00:44:28 +0100 Subject: [PATCH] mount: also detect if uid or gid are set in same option string: -o uid=123,gid=456 --- cmd/cmount/mount.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/cmd/cmount/mount.go b/cmd/cmount/mount.go index 9d30599ad..8029fca8a 100644 --- a/cmd/cmount/mount.go +++ b/cmd/cmount/mount.go @@ -50,8 +50,11 @@ func mountOptions(VFS *vfs.VFS, device string, mountpoint string, opt *mountlib. hasExtraOption := func(optionName string) bool { optionName += "=" for _, option := range opt.ExtraOptions { - if strings.HasPrefix(option, optionName) { - return true + suboptions := strings.Split(option, ",") + for _, suboption := range suboptions { + if strings.HasPrefix(suboption, optionName) { + return true + } } } return false