diff --git a/server/http_upload.go b/server/http_upload.go index 8bc3ae8f..13f1c3be 100644 --- a/server/http_upload.go +++ b/server/http_upload.go @@ -143,7 +143,7 @@ func cleanEmptyFolders(dirPath string) error { return err } //对于临时目录与大文件目录不进行删除 - if info.IsDir() && !strings.Contains(path, STORE_DIR_NAME+"/_big") && !strings.Contains(path, STORE_DIR_NAME+"/_tmp") && isEmptyDir(path) { + if info.IsDir() && !strings.Contains(path, STORE_DIR_NAME+"/_big") && !strings.Contains(path, STORE_DIR_NAME+"/_tmp") && path != STORE_DIR_NAME && isEmptyDir(path) { err := os.RemoveAll(path) if err != nil { return log.Errorf("failed to remove empty folder: %s", err)