-
Notifications
You must be signed in to change notification settings - Fork 0
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] Fix to prevent moving files by renaming files using FileTreeView #10244
Comments
However, it's only a partial fix for all the issues listed in #11609. It solves the main one, but the others still remain. Some tests cases that should fail:
|
The fix covers the cases like : hello/world.js and helloworld.js/ are already covered by appshell rename validation logic. /helloworld.js is already covered. |
Which platform are you on? At least on Windows the validation fails with ➡️ folder Let's create a folder and try that again it actually created the other file too (like one could except if relative paths would be valid (The foo/bar.js file opens the correct file too, so there's that). Similar things can be done with things like creating folders by naming a file with ending slash et cetera and it can be abused to infinity. That's why I think it's important that the fix would apply to all the cases regarding |
I get your point. I think it makes more sense to weed out validation against base name completely. That is the safest path to go. I have updated the PR. I would appreciate if you can validate it on windows platform. I verified the use cases on mac platform. |
Works great for renaming old files on Windows 👍 However, creating a new file and renaming that instantly skips Check out this if-clause https://github.com/adobe/brackets/blob/d939740fd5c368c347ac6a8c7cef2941981aa2fb/src/project/ProjectModel.js#L959 and the method |
I intentionally left out createAtPath workflow as I believe its out of the scope of this PR. I completely understand the workflow mentioned above but I am skeptical of this being called a bug or not. Couple of reasons :
I would prefer discussing that over the group once and once confirmed , I myself am willing to make that change too :) |
Yeah, I am okay with this PR focusing on the renaming files part too 👍 ping |
Ping. I am not sure abt the turnaround time. |
Sorry for the late response . |
|
|
Thanks |
Ping ? |
Reviewed and merged (as it should have been a while ago). |
Thanks |
Wednesday Oct 28, 2015 at 10:13 GMT
Originally opened as adobe/brackets#11862
tallandroid included the following code: https://github.com/adobe/brackets/pull/11862/commits
The text was updated successfully, but these errors were encountered: