1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-27 15:54:39 +00:00

Do not change path when move folder (#7921)

This commit is contained in:
Michael An
2025-06-12 11:08:38 +08:00
committed by GitHub
parent 6d546f5067
commit ea1e3fe4e3

View File

@@ -1330,10 +1330,6 @@ class LibContentView extends React.Component {
this.updateMoveCopyTreeNode(moveToDirentPath);
}
this.moveDirent(direntPath, moveToDirentPath);
this.setState({ path: moveToDirentPath });
if (this.state.path !== moveToDirentPath) {
this.loadDirentList(moveToDirentPath);
}
};
if (this.state.isTreePanelShown) {
@@ -1352,10 +1348,6 @@ class LibContentView extends React.Component {
if (byDialog) {
this.updateRecentlyUsedList(targetRepo, moveToDirentPath);
}
// update location
let repoInfo = this.state.currentRepoInfo;
let url = siteRoot + 'library/' + repoID + '/' + encodeURIComponent(repoInfo.repo_name) + Utils.encodePath(moveToDirentPath);
window.history.pushState({ url, path: moveToDirentPath }, moveToDirentPath, url);
};
onMoveItem = (destRepo, dirent, moveToDirentPath, nodeParentPath, byDialog = false) => {