Add missing error check in RemoveDirRecur
This commit is contained in:
parent
47f21d10f0
commit
509a294b60
5
ftp.go
5
ftp.go
@ -516,7 +516,12 @@ func (c *ServerConn) RemoveDirRecur(path string) error {
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
entries, err := c.List(currentDir)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
for _, entry := range entries {
|
||||
if entry.Name != ".." && entry.Name != "." {
|
||||
if entry.Type == EntryTypeFolder {
|
||||
|
Loading…
Reference in New Issue
Block a user