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

Rename folder does not update jsTree completely #2551

Closed
redmunds opened this issue Jan 15, 2013 · 7 comments
Closed

Rename folder does not update jsTree completely #2551

redmunds opened this issue Jan 15, 2013 · 7 comments
Assignees
Milestone

Comments

@redmunds
Copy link
Contributor

I noticed this while working on #2503. Renaming a folder does not update the file paths in Find in Files panel, but it's a problem in ProjectManager.js:

  1. Put breakpoint in ProjectManager.js function renameItem() near beginning of function on this line:
    if (oldName === newName) {
  1. Rename a folder in Brackets
  2. Repeat step 2 as necessary

Results:
newName is the same as oldName, and oldName is the name when Brackets session started. So, name change event is never sent for folders.

Notice that the new name is displayed the project tree.

@pthiess
Copy link
Contributor

pthiess commented Jan 18, 2013

Medium priority, assigned to @redmunds

@DennisKehrig
Copy link
Contributor

The problem is that the regular expression requires the string to end with the new name, but for folders there's a "/" there. As a result, the new name is not determined correctly. I will put a pull request later to fix this.

@WebsiteDeveloper
Copy link
Contributor

@DennisKehrig i already submitted a pull adressing this issue

@DennisKehrig
Copy link
Contributor

@WebsiteDeveloper Almost :) Please see my comment
Edit: The URL was incorrect

@DennisKehrig
Copy link
Contributor

@WebsiteDeveloper Sorry that I basically replaced your work, I didn't see your pull request before I encountered and fixed the bug myself, otherwise I would have tried your fix and reported back to you.

@ghost ghost assigned gruehle and redmunds Feb 26, 2013
@gruehle
Copy link
Member

gruehle commented Feb 26, 2013

FBNC, @redmunds

@redmunds
Copy link
Contributor Author

Confirmed. Closing.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants