mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-10 19:29:56 +00:00
repair new file bug
This commit is contained in:
@@ -151,8 +151,9 @@ class Item extends Component {
|
|||||||
let iconUrl = '';
|
let iconUrl = '';
|
||||||
let linkUrl = '';
|
let linkUrl = '';
|
||||||
if (item.is_dir) {
|
if (item.is_dir) {
|
||||||
|
let path = item.path === '/' ? '/' : item.path.slice(0, item.path.length - 1);
|
||||||
iconUrl = Utils.getFolderIconUrl(false);
|
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 {
|
} else {
|
||||||
iconUrl = Utils.getFileIconUrl(item.obj_name);
|
iconUrl = Utils.getFileIconUrl(item.obj_name);
|
||||||
linkUrl = `${siteRoot}lib/${item.repo_id}/file${Utils.encodePath(item.path)}`;
|
linkUrl = `${siteRoot}lib/${item.repo_id}/file${Utils.encodePath(item.path)}`;
|
||||||
|
Reference in New Issue
Block a user