1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-10 03:11:07 +00:00

repair new file bug

This commit is contained in:
shanshuirenjia
2019-05-15 18:43:40 +08:00
parent 9221d2a7e2
commit a262e06d3f

View File

@@ -151,8 +151,9 @@ class Item extends Component {
let iconUrl = '';
let linkUrl = '';
if (item.is_dir) {
let path = item.path === '/' ? '/' : item.path.slice(0, item.path.length - 1);
iconUrl = Utils.getFolderIconUrl(false);
linkUrl = `${siteRoot}library/${item.repo_id}/${item.repo_name}${Utils.encodePath(item.path)}`;
linkUrl = `${siteRoot}library/${item.repo_id}/${item.repo_name}${Utils.encodePath(path)}`;
} else {
iconUrl = Utils.getFileIconUrl(item.obj_name);
linkUrl = `${siteRoot}lib/${item.repo_id}/file${Utils.encodePath(item.path)}`;