1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-20 10:58:33 +00:00

[user-info] use '/' as root dir name of shared link

This commit is contained in:
lian
2015-08-24 09:53:00 +08:00
parent eda7a6ef1c
commit 01be40a340

View File

@@ -592,7 +592,11 @@ def user_info(request, email):
fs.delete()
continue
if fs.path == '/':
fs.filename = '/'
else:
fs.filename = os.path.basename(fs.path.rstrip('/'))
path = fs.path
if path[-1] != '/': # Normalize dir path
path += '/'
@@ -624,7 +628,12 @@ def user_info(request, email):
if seafile_api.get_dir_id_by_path(r.id, link.path) is None:
link.delete()
continue
if link.path == '/':
link.dir_name = '/'
else:
link.dir_name = os.path.basename(link.path.rstrip('/'))
link.is_upload = True
p_uploadlinks.append(link)
except SearpcError as e: