1
0
mirror of https://github.com/haiwen/seafile-server.git synced 2025-05-12 02:01:34 +00:00

Add MAX_DIR_OBJECT macro

This commit is contained in:
杨赫然 2022-11-15 17:39:12 +08:00
parent 87e17f20c9
commit 7326aaca9d

View File

@ -1503,6 +1503,8 @@ out:
return ret;
}
#define MAX_DIR_OBJECT 1000
typedef struct CalResult {
int num;
GList *results;
@ -1533,7 +1535,7 @@ get_fs_id_list_recursive (SeafRepo *repo,
for (ptr = root->entries; ptr; ptr = ptr->next) {
dent = ptr->data;
if (result->num < 10) {
if (result->num < MAX_DIR_OBJECT) {
if (S_ISDIR(dent->mode)) {
ret = get_fs_id_list_recursive (repo, dent->id, result);
if (ret < 0) {