Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CLOSED] Prevent duplicate tree nodes when renaming the only file in a directory #5928

Open
core-ai-bot opened this issue Aug 30, 2021 · 6 comments

Comments

@core-ai-bot
Copy link
Member

Issue by jasonsanjose
Wednesday Jan 15, 2014 at 00:32 GMT
Originally opened as adobe/brackets#6522


Use jstree open_node in corner case #6474 where renaming the only file in a directory caused duplicate tree nodes to appear


jasonsanjose included the following code: https://github.com/adobe/brackets/pull/6522/commits

@core-ai-bot
Copy link
Member Author

Comment by jasonsanjose
Wednesday Jan 15, 2014 at 00:35 GMT


Assigning@couzteau for review

@core-ai-bot
Copy link
Member Author

Comment by couzteau
Wednesday Jan 15, 2014 at 02:16 GMT


will look at this later tonight.

@core-ai-bot
Copy link
Member Author

Comment by couzteau
Wednesday Jan 15, 2014 at 06:15 GMT


Done with initial review. The fix works great. I have just one Q regarding the additional redraw, see comment above. While testing I have seen a few cases where the tree wouldn't update at all after renaming a file. In these situations I was also not hitting any breakpoints in the _fileSystemChange handler. Couldn't really repro, but I have seen it a couple of times. That would be a different issue I think, but for the time being I cannot really put my finder on it.

@core-ai-bot
Copy link
Member Author

Comment by jasonsanjose
Wednesday Jan 15, 2014 at 06:44 GMT


The additional redraw (to fix the selection marker drawing) is necessary since the first synchronous redraw will happen when the nodes are deleted for this event. This additional async redraw happens after jstree calls into the FileSystem when completing open_node.

@core-ai-bot
Copy link
Member Author

Comment by jasonsanjose
Wednesday Jan 15, 2014 at 06:46 GMT


As far as not hitting breakpoints in _fileSystemChange, that would be a different issue. Feel free to merge if I answered your questions.

@core-ai-bot
Copy link
Member Author

Comment by couzteau
Wednesday Jan 15, 2014 at 20:23 GMT


Thanks, I understand now. Actually it dawned on me lats night that the redraw handler and the open node call are directly related ;) - Of course they are! Thanks. This is looking good. The fix is working well and the tests are passing. Merging.

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

No branches or pull requests

1 participant