-
Notifications
You must be signed in to change notification settings - Fork 7.6k
[File Watchers] Renaming a file that's alone in a folder duplicates it in project tree #6474
Comments
Looking at #6468 to see if that fixes the issue. |
Tagging fix in progress |
#6468 does fix the duplicate entry. But there is a (minor?) side effect: the folder containing the image is collapsed when brackets gains focus. |
No "fix in progress" tag yet. Tagging again. |
Confirmed on the last bit about the collapsed folder. But I never got that to reproduce the first time. Please retest on master, thanks! |
I still see the collapsed folder every time. If you follow the steps in the bug description, but make sure to expand the screenshots folder before you rename, you should see it too. Leaving the bug open for now, but I'd be ok to close this one and open a new one about the closed folder. But I'd like to hear wether you can repro that. |
Now I do see the duplicate entries on master again. |
I have fixed #6001 on a branch off of master after the merge of jason's fix but that also doesn't fix the duplicate item. branch: https://github.com/adobe/brackets/tree/couzteau/fix-6001-imgPreview-dupeOpen |
FYI There are 3 new pull requests around the file tree #6494 fix rename events I've got a branch that merges all 3 fixes When renaming ANY file in the getting started project, the tree doesn't update for me at all. If I create a copy of the project folder on my desktop, the tree updates...but I see @couzteau's bug where the folder node appears to close even though the style visible is still Is it possible that being in the git repo has something to do with this bug? |
I take that back, I can't reproduce the bug with It looks like the change event doesn't work for the |
This duplication issue also reproduces for folders and files. Is it possible to fix it with this one or it has been fixed with latest pull request? Steps for case folder name:
Result: In the project tree, it will show duplicated subfolder name. |
@julieyuan it looks like this is fixed by one of the pull requests above. I tested using branch that merges all 3 PRs |
I quickly tested master and I also see the fix. Will test a bit more before closing. |
FBNC |
Confirmed fix. Closing. |
tested some more and I started to see the issue again. Currently I see this issue every time. Not sure what changed. Certainly not the code. I first saw it again, when reverting the name change I had previously made to verify the fix. The next thing is that I switch back to the Finder hit CMD-Z to revert the name change and Brackets updates the file tree, before it gains focus. |
Currently I see this issue every time with the Getting started project. Other projects do not show the bug. |
Sometimes i see the old and the new file names in the project tree instead of the duplicate item. |
@couzteau based on that, do you think we can re-title this bug as a symlink issue and not a more general problem? |
@jasonsanjose Yes, but I'm not sure that that is really the issue. I have just reproduced the issue after it went away again via Finder's Undo, that is first rename is working fine, then going back to Finder Undo and then it comes back, |
The reason I'm not convinced this has something to do with symlinks is that I can repro th bug when I open the getting stater project by point the brackets open project dialog directly to the getting started folder on disk. |
There might be a related fix here #6520, but it only affected file renames inside of brackets, not from external renames. But it could be possible that you had a rename in brackets that created an invalid cache of DOM nodes, leading to errors later on. |
Checked out branch #6520 but I still see the issue. I have also deleted cef_data before testing to eliminate the odd chance that I was running of of stake or bad data. |
@jasonsanjose How can I help you to look at this? Do you want to remote into my machine. I can repro it pretty much all the time. |
Not sure what was happening, but I can reproduce it now. Investigating. |
Ok, I have done a bit more testing and I was able to create a 2nd test project to repro the issue. It appeared important that the image folder to contain only a single image. |
…e in a directory caused duplicate tree nodes to appear
Looks like there is one more edge case to fix before I can close this bug, you mentioned this in the pull request discussion: externally rename a file inside a closed folder creates a duplicate entry and opens the folder. |
@jasonsanjose I pushed a branch with a partial fix for the remaining case: https://github.com/adobe/brackets/compare/couzteau;fix-6474 It addresses the issue of the duplicate entry, but the closed state of the folder is not yet maintained. But I think since you are more familiar with the jstree code, you'll be able to add that. |
Correction, see #6553 instead. |
#6553 does not fix this bug. using the branch externally renaming a file inside a closed folder will both create a duplicate entry and open the folder. |
FBNC @couzteau |
Happy to finally close this one for good. Thanks @jasonsanjose @peterflynn - this WAS a nasty bug. |
new description:
screenshots/quick-edit.png
toscreenshots/test.png
Bug: a) The image
test.png
is now listed twice in the project treeb) The folder
screenshots
has been opened.old description:
Steps:
screenshots/quick-edit.png
toscreenshots/test.png
Bug: The image
test.png
is now listed twice in the project treeI wouldn't be surprised if #6001 was related. - verified. It's not!
The text was updated successfully, but these errors were encountered: