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

Commit

Permalink
Bugfix: directory renames were not propagated
Browse files Browse the repository at this point in the history
  • Loading branch information
DennisKehrig committed Feb 20, 2013
1 parent 43b868a commit 3d1e09b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/project/ProjectManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -1296,7 +1296,9 @@ define(function (require, exports, module) {
}

var oldName = selected.data("entry").fullPath;
var oldNameRegex = new RegExp(StringUtils.regexEscape(data.rslt.old_name) + "$");
// Folder paths have to end with a slash. Use look-head (?=...) to only replace the folder's name, not the slash as well
var oldNameEndPattern = isFolder ? "(?=\/$)" : "$";
var oldNameRegex = new RegExp(StringUtils.regexEscape(data.rslt.old_name) + oldNameEndPattern);
var newName = oldName.replace(oldNameRegex, data.rslt.new_name);

renameItem(oldName, newName, isFolder)
Expand Down

0 comments on commit 3d1e09b

Please sign in to comment.