rclone/sftp: Improve handling of ErrDot errors

Restic now yields a more informative error message when exec.ErrDot occurs.
This commit is contained in:
Leo R. Lundgren committed 2022-09-25 16:19:03 +02:00
1 parent d6575f53ca
commit ebe9f2c969
6 files changed
+62 -1

No files matched your search

+3
View File
@@ -85,6 +85,9 @@ func run(command string, args ...string) (*StdioConn, *sync.WaitGroup, func() er
err = errW
}
if err != nil {
if backend.IsErrDot(err) {
return nil, nil, nil, errors.Errorf("cannot implicitly run relative executable %v found in current directory, use -o rclone.program=./<program> to override", cmd.Path)
}
return nil, nil, nil, err
}