Skip to content

Commit fc97fb6

Browse files
feiniksyangheran
andauthored
Adjust init folder perms (#2902)
Co-authored-by: yangheran <heran.yang@seafile.com>
1 parent bc71a58 commit fc97fb6

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

daemon/repo-mgr.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -714,10 +714,6 @@ init_folder_perms (SeafRepoManager *mgr)
714714
GList *perms;
715715
char *repo_id;
716716

717-
priv->user_perms = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
718-
priv->group_perms = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
719-
pthread_mutex_init (&priv->perm_lock, NULL);
720-
721717
for (ptr = repo_ids; ptr; ptr = ptr->next) {
722718
repo_id = ptr->data;
723719
perms = load_folder_perms_for_repo (mgr, repo_id, FOLDER_PERM_TYPE_USER);
@@ -6917,6 +6913,10 @@ seaf_repo_manager_new (SeafileSession *seaf)
69176913
mgr->priv->block_map_cache_table = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);
69186914
pthread_rwlock_init (&mgr->priv->block_map_lock, NULL);
69196915

6916+
mgr->priv->user_perms = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
6917+
mgr->priv->group_perms = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, NULL);
6918+
pthread_mutex_init (&mgr->priv->perm_lock, NULL);
6919+
69206920
return mgr;
69216921
}
69226922

0 commit comments

Comments
 (0)