diff --git a/drivers/sftp/driver.go b/drivers/sftp/driver.go index a0b70b1b..a531e826 100644 --- a/drivers/sftp/driver.go +++ b/drivers/sftp/driver.go @@ -195,7 +195,7 @@ func (driver SFTP) Delete(path string, account *model.Account) error { if err != nil { return err } - return client.Remove(utils.Join(account.RootFolder, path)) + return client.remove(utils.Join(account.RootFolder, path)) } func (driver SFTP) Upload(file *model.FileStream, account *model.Account) error { diff --git a/drivers/sftp/sftp.go b/drivers/sftp/sftp.go index 8115dbd1..c314f55b 100644 --- a/drivers/sftp/sftp.go +++ b/drivers/sftp/sftp.go @@ -49,7 +49,7 @@ func (client *Client) Files(remotePath string) ([]os.FileInfo, error) { return client.ReadDir(remotePath) } -func (client *Client) Remove(remotePath string) error { +func (client *Client) remove(remotePath string) error { f, err := client.Stat(remotePath) if err != nil { return nil