1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-05-11 09:24:38 +00:00

Merge pull request from haiwen/convert-repo

fix convert_repo_path bug
This commit is contained in:
Daniel Pan 2022-04-08 12:25:24 +08:00 committed by GitHub
commit c82a57c3f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1139,7 +1139,8 @@ def react_fake_view(request, **kwargs):
return render_error(request, error_msg)
converted_path = repo_path_dict['path']
if not seafile_api.get_dirent_by_path(converted_repo_id, converted_path):
if converted_path != '/' and not seafile_api.get_dirent_by_path(converted_repo_id, converted_path):
error_msg = 'Dirent %s not found.' % converted_path
return render_error(request, error_msg)