mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-05 17:02:47 +00:00
repair path caculate error (#2934)
* repair path caculate error * improve caculate path algorithm
This commit is contained in:
@@ -108,10 +108,9 @@ class DirView extends React.Component {
|
||||
});
|
||||
}
|
||||
|
||||
let repoName = repoInfo.repo_name;
|
||||
let repoID = repoInfo.repo_id;
|
||||
let path = location.slice(location.indexOf(repoID) + repoID.length); // get the string after repoID
|
||||
path = path.slice(path.indexOf(repoName) + repoName.length); // get current path
|
||||
let path = location.slice(location.indexOf(repoID) + repoID.length + 1); // get the string after repoID
|
||||
path = path.slice(path.indexOf('/')); // get current path
|
||||
this.setState({path: path});
|
||||
if (!res.data.lib_need_decrypt) {
|
||||
this.updateDirentList(path);
|
||||
|
Reference in New Issue
Block a user