processing / processing/p5.js-web-editor
Naming a folder 'root' causes issues
Open
Nobody has claimed this yet.
Bug
Priority:Medium
- Dominant language
- JavaScript
- Stars
- 1.7k
- Forks
- 1.7k
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 8
Description
Nature of issue?
- Found a bug
Details about the bug:
This is a related issue to #842, but requires a more in-depth refactoring to fix.
- Steps to reproduce this bug:
- Create a folder called
root. The folder is created, but shows up as blank in the sidebar due to the special behavior for a directory based on this name.
You can also cause a crash by doing the following:
- Create a folder named something that isn't 'root', and add a file to it.
- Rename the folder to 'root' and save the project.
- When you next load the project, it will crash the front-end. (Example sketch: https://editor.p5js.org/meiamsome/sketches/cyNfPGeDu )
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the issue by creating, renaming, saving, and reloading a folder named root, using the linked example sketch if helpful. Trace the front-end handling for the special root directory and project loading; done means the folder appears normally and renaming a populated folder to root no longer crashes the front end.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, web-dev
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 50/100