Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Fixed: Issue #2551 Rename folder does not update jsTree completely #2862

Closed
wants to merge 4 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/project/ProjectManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -1296,8 +1296,8 @@ define(function (require, exports, module) {
}

var oldName = selected.data("entry").fullPath;
var oldNameRegex = new RegExp(StringUtils.regexEscape(data.rslt.old_name) + "$");
var newName = oldName.replace(oldNameRegex, data.rslt.new_name);
var oldNameRegex = new RegExp(StringUtils.regexEscape(data.rslt.old_name + "/") + "$");
var newName = oldName.replace(oldNameRegex, data.rslt.new_name) + "/";

renameItem(oldName, newName, isFolder)
.done(function () {
Expand Down