mirror of
https://github.com/kataras/iris.git
synced 2026-01-04 18:57:03 +00:00
utils.file replace os.Remove with os.RemoveAll
This commit is contained in:
@@ -142,9 +142,9 @@ func Unzip(archive string, target string) (string, error) {
|
||||
return createdFolder, nil
|
||||
}
|
||||
|
||||
// RemoveFile removes a file and returns an error, if any
|
||||
// RemoveFile removes a file or directory and returns an error, if any
|
||||
func RemoveFile(filePath string) error {
|
||||
return ErrFileRemove.With(os.Remove(filePath))
|
||||
return ErrFileRemove.With(os.RemoveAll(filePath))
|
||||
}
|
||||
|
||||
// Install is just the flow of: downloadZip -> unzip -> removeFile(zippedFile)
|
||||
|
||||
Reference in New Issue
Block a user