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

@@ -101,7 +101,7 @@ func (c *Connection) Remove(name string) error {
if fi.IsDir() && fi.Mode()&os.ModeSymlink != os.ModeSymlink {
c.Log(logger.LevelDebug, "cannot remove %#v is not a file/symlink", p)
return c.GetGenericError()
return c.GetGenericError(nil)
}
return c.RemoveFile(p, name, fi)
}