mirror of
https://github.com/haiwen/seafile-server.git
synced 2025-08-31 23:19:36 +00:00
Merge branch '6.1'
This commit is contained in:
@@ -5100,4 +5100,39 @@ seafile_get_file_count_info_by_path (const char *repo_id,
|
||||
return ret;
|
||||
}
|
||||
|
||||
char *
|
||||
seafile_get_trash_repo_owner (const char *repo_id, GError **error)
|
||||
{
|
||||
if (!repo_id) {
|
||||
g_set_error (error, SEAFILE_DOMAIN, SEAF_ERR_BAD_ARGS, "Argument should not be null");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
return seaf_get_trash_repo_owner (repo_id);
|
||||
}
|
||||
|
||||
int
|
||||
seafile_mkdir_with_parents (const char *repo_id, const char *parent_dir,
|
||||
const char *new_dir_path, const char *user,
|
||||
GError **error)
|
||||
{
|
||||
if (!repo_id || !parent_dir || !new_dir_path || !user) {
|
||||
g_set_error (error, 0, SEAF_ERR_BAD_ARGS, "Argument should not be null");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!is_uuid_valid (repo_id)) {
|
||||
g_set_error (error, SEAFILE_DOMAIN, SEAF_ERR_BAD_ARGS, "Invalid repo id");
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (seaf_repo_manager_mkdir_with_parents (seaf->repo_mgr, repo_id,
|
||||
parent_dir, new_dir_path,
|
||||
user, error) < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif /* SEAFILE_SERVER */
|
||||
|
Reference in New Issue
Block a user