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

Fixed generating shared link for sub libraries.

This commit is contained in:
Shuai Lin
2016-04-22 15:17:54 +08:00
parent 88a73c4323
commit 54beacc042

View File

@@ -2396,7 +2396,8 @@ class FileSharedLinkView(APIView):
is_dir = True
else:
try:
dirent = seafile_api.get_dirent_by_path(repo_id, path)
real_path = repo.origin_path + path if repo.origin_path else path
dirent = seafile_api.get_dirent_by_path(repo.store_id, real_path)
except SearpcError as e:
logger.error(e)
return api_error(status.HTTP_500_INTERNAL_SERVER_ERROR, "Internal error")