mirror of
https://github.com/haiwen/seafile-server.git
synced 2025-04-28 03:20:10 +00:00
Fix parse file access user error (#714)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
This commit is contained in:
parent
ed6a292061
commit
b1e7323647
@ -664,6 +664,7 @@ parse_file_access_info (const char *rsp_content, int rsp_size)
|
||||
json_t *object;
|
||||
json_error_t jerror;
|
||||
const char *user = NULL;
|
||||
char *ret = NULL;
|
||||
|
||||
object = json_loadb (rsp_content, rsp_size, 0, &jerror);
|
||||
if (!object) {
|
||||
@ -676,11 +677,12 @@ parse_file_access_info (const char *rsp_content, int rsp_size)
|
||||
seaf_warning ("Failed to find user in json when check file access in Seahub.\n");
|
||||
goto out;
|
||||
}
|
||||
ret = g_strdup (user);
|
||||
|
||||
out:
|
||||
json_decref (object);
|
||||
|
||||
return g_strdup (user);
|
||||
return ret;
|
||||
}
|
||||
|
||||
int
|
||||
|
Loading…
Reference in New Issue
Block a user