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:
@@ -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)}`;
|
||||
|
Reference in New Issue
Block a user