mirror of
https://github.com/rclone/rclone.git
synced 2024-11-25 01:44:41 +01:00
rclone.mount: ignore _netdev mount argument - FIxes #5808
Do not trigger an error upon parsing argument starting with underscores. _netdev was already ignored after parsing.
This commit is contained in:
parent
6500e1d205
commit
a36fef8a66
@ -208,7 +208,7 @@ func parseHelperOptionString(optString string) (opts []string, err error) {
|
||||
if len(param) == 0 {
|
||||
return nil, errHelperEmptyOption
|
||||
}
|
||||
if param[0] == '-' || param[0] == '_' {
|
||||
if param[0] == '-' {
|
||||
return nil, errHelperOptionName
|
||||
}
|
||||
prev = i + 1
|
||||
|
@ -20,7 +20,7 @@ func TestMountHelperArgs(t *testing.T) {
|
||||
src: []string{},
|
||||
dst: []string{"mount", "--daemon"},
|
||||
}, {
|
||||
src: []string{"-o", `x-systemd.automount,vvv,env.HTTPS_PROXY="a b;c,d?EF",ro,rw,args2env`},
|
||||
src: []string{"-o", `x-systemd.automount,vvv,env.HTTPS_PROXY="a b;c,d?EF",ro,rw,args2env,_netdev`},
|
||||
dst: []string{"mount", "--read-only", "--verbose=3", "--daemon"},
|
||||
env: "HTTPS_PROXY=a b;c,d?EF",
|
||||
}}
|
||||
|
Loading…
Reference in New Issue
Block a user