forked from TrueCloudLab/rclone
cmd/mountlib: better snap mount error message
Mounting will always fail when rclone is installed from the snap package manager. But the error message generated when trying to mount from a snap install was not very good. Improve the error message. Fixes #8208
This commit is contained in:
parent
2446c4928d
commit
a78bc093de
1 changed files with 3 additions and 0 deletions
|
@ -373,6 +373,9 @@ func (m *MountPoint) Mount() (mountDaemon *os.Process, err error) {
|
|||
|
||||
m.ErrChan, m.UnmountFn, err = m.MountFn(m.VFS, m.MountPoint, &m.MountOpt)
|
||||
if err != nil {
|
||||
if len(os.Args) > 0 && strings.HasPrefix(os.Args[0], "/snap/") {
|
||||
return nil, fmt.Errorf("mounting is not supported when running from snap")
|
||||
}
|
||||
return nil, fmt.Errorf("failed to mount FUSE fs: %w", err)
|
||||
}
|
||||
m.MountedOn = time.Now()
|
||||
|
|
Loading…
Reference in a new issue