Skip to content

Commit 7a4610a

Browse files
author
sjqzhang
committed
ignore files folder
1 parent acb7b20 commit 7a4610a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/http_upload.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ func cleanEmptyFolders(dirPath string) error {
143143
return err
144144
}
145145
//对于临时目录与大文件目录不进行删除
146-
if info.IsDir() && !strings.Contains(path, STORE_DIR_NAME+"/_big") && !strings.Contains(path, STORE_DIR_NAME+"/_tmp") && isEmptyDir(path) {
146+
if info.IsDir() && !strings.Contains(path, STORE_DIR_NAME+"/_big") && !strings.Contains(path, STORE_DIR_NAME+"/_tmp") && path != STORE_DIR_NAME && isEmptyDir(path) {
147147
err := os.RemoveAll(path)
148148
if err != nil {
149149
return log.Errorf("failed to remove empty folder: %s", err)

0 commit comments

Comments
 (0)