ssh commands: return better error messages

This improve the fix for #171 and return better error message for
SSH commands other than SCP too
This commit is contained in:
Nicola Murino
2020-09-19 10:14:30 +02:00
parent f0c9b55036
commit 6c1a7449fe
8 changed files with 32 additions and 62 deletions

View File

@@ -427,16 +427,6 @@ func (S3Fs) IsPermission(err error) bool {
return strings.Contains(err.Error(), "403")
}
// GetPermissionError returns a permission error for this FS
func (S3Fs) GetPermissionError() error {
return errors.New("403 permission denied")
}
// GetNotExistError returns a not exist error for this FS
func (S3Fs) GetNotExistError() error {
return errors.New("404 no such file or directory")
}
// CheckRootPath creates the specified local root directory if it does not exists
func (fs S3Fs) CheckRootPath(username string, uid int, gid int) bool {
// we need a local directory for temporary files