mirror of
https://github.com/haiwen/seafile-server.git
synced 2025-08-02 07:43:09 +00:00
Add MAX_DIR_OBJECT macro
This commit is contained in:
parent
87e17f20c9
commit
7326aaca9d
@ -1503,6 +1503,8 @@ out:
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define MAX_DIR_OBJECT 1000
|
||||||
|
|
||||||
typedef struct CalResult {
|
typedef struct CalResult {
|
||||||
int num;
|
int num;
|
||||||
GList *results;
|
GList *results;
|
||||||
@ -1533,7 +1535,7 @@ get_fs_id_list_recursive (SeafRepo *repo,
|
|||||||
|
|
||||||
for (ptr = root->entries; ptr; ptr = ptr->next) {
|
for (ptr = root->entries; ptr; ptr = ptr->next) {
|
||||||
dent = ptr->data;
|
dent = ptr->data;
|
||||||
if (result->num < 10) {
|
if (result->num < MAX_DIR_OBJECT) {
|
||||||
if (S_ISDIR(dent->mode)) {
|
if (S_ISDIR(dent->mode)) {
|
||||||
ret = get_fs_id_list_recursive (repo, dent->id, result);
|
ret = get_fs_id_list_recursive (repo, dent->id, result);
|
||||||
if (ret < 0) {
|
if (ret < 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user