Skip to content

Commit

Permalink
ignore files folder
Browse files Browse the repository at this point in the history
  • Loading branch information
sjqzhang committed Sep 18, 2024
1 parent acb7b20 commit 7a4610a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/http_upload.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 7a4610a

Please sign in to comment.