mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-20 19:08:21 +00:00
[user-info] use '/' as root dir name of shared link
This commit is contained in:
@@ -592,7 +592,11 @@ def user_info(request, email):
|
|||||||
fs.delete()
|
fs.delete()
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if fs.path == '/':
|
||||||
|
fs.filename = '/'
|
||||||
|
else:
|
||||||
fs.filename = os.path.basename(fs.path.rstrip('/'))
|
fs.filename = os.path.basename(fs.path.rstrip('/'))
|
||||||
|
|
||||||
path = fs.path
|
path = fs.path
|
||||||
if path[-1] != '/': # Normalize dir path
|
if path[-1] != '/': # Normalize dir path
|
||||||
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:
|
if seafile_api.get_dir_id_by_path(r.id, link.path) is None:
|
||||||
link.delete()
|
link.delete()
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
if link.path == '/':
|
||||||
|
link.dir_name = '/'
|
||||||
|
else:
|
||||||
link.dir_name = os.path.basename(link.path.rstrip('/'))
|
link.dir_name = os.path.basename(link.path.rstrip('/'))
|
||||||
|
|
||||||
link.is_upload = True
|
link.is_upload = True
|
||||||
p_uploadlinks.append(link)
|
p_uploadlinks.append(link)
|
||||||
except SearpcError as e:
|
except SearpcError as e:
|
||||||
|
Reference in New Issue
Block a user