fix host clean recycle bin

This commit is contained in:
wanyaoqi
2019-04-22 20:45:39 +08:00
parent 409e8cf9cc
commit 1fffe2f4f8
+3 -1
View File
@@ -345,7 +345,9 @@ func cleanDailyFiles(storagePath, subDir string, keepDay int) {
if date.Before(markTime) {
log.Infof("Real delete %s", file)
subDirPath := path.Join(recycleDir, file.Name())
procutils.NewCommand("rm", "-rf", subDirPath)
if _, err := procutils.NewCommand("rm", "-rf", subDirPath).Run(); err != nil {
log.Errorf("clean recycle dir %s error %s", subDirPath, err)
}
}
}
}