| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
I had to add some more practical explanation to a few lines and also noticed a piece of code wasn't working the way it was described as ,noticed code only worked with a relative path and also commented the code after adding a relative path. |
Sorry, something went wrong.
There was a problem hiding this comment.
| //Note the relative path to `tmp` below ,otherwise path won't be created in our project. | |
| mkdir('./tmp/a/apple', { recursive: true }, (err) => { | |
| // Create ./tmp/a/apple, regardless of whether ./tmp and ./tmp/a exist. | |
| mkdir('./tmp/a/apple', { recursive: true }, (err) => { |
Sorry, something went wrong.
There was a problem hiding this comment.
(The code should work fine with an absolute path instead of a relative path, but there are security implications to creating directories in /tmp with predictable names that aren't accounted for in the example code. It shouldn't ignore if someone else has already created the directory with permissions different than expected or with pre-existing contents. So I think it's good to switch it to a relative directory like you've done here or else some other absolute directory.)
Sorry, something went wrong.
There was a problem hiding this comment.
I think I have a better explanation to the whole behaviour of the code above ,can I go ahead and fix it?
Sorry, something went wrong.
Co-authored-by: Rich Trott <rtrott@gmail.com>
Co-authored-by: Rich Trott <rtrott@gmail.com>
PR-URL: #48109 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: #48109 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs#48109 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs#48109 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs#48109 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
| Back | FazBrowse Home | New Git URL |
No description provided.