1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-31 14:42:10 +00:00

Update share_links.py (#7691)

This commit is contained in:
Ranjiwei
2025-03-31 16:20:48 +08:00
committed by GitHub
parent 6d9d952079
commit 13098287d3

View File

@@ -950,10 +950,7 @@ class ShareLinkDirents(APIView):
return api_error(status.HTTP_404_NOT_FOUND, error_msg)
try:
current_commit = seafile_api.get_commit_list(repo_id, 0, 1)[0]
dirent_list = seafile_api.list_dir_by_commit_and_path(repo_id,
current_commit.id,
path, -1, -1)
dirent_list = seafile_api.list_dir_by_path(repo_id, path)
except Exception as e:
logger.error(e)
error_msg = 'Internal Server Error'