| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
There was a problem hiding this comment.
FYI you don't need to open a new PR to address the conflicts - usually it's fine to just rebase against the latest main branch, squash the commits if that's easier, and force push to your PR branch.
Sorry, something went wrong.
|
@joyeecheung, thanks for your suggestion. I resolved the conflict with the latest main branch. But, due to the changes in the helper, in CI the conflict was coming from one of my own commits in that PR. Then, I tried to do cherry pick for that commit hash, but I did the reverse of what I wanted to do. And it became messy. I will recreate this scenario locally to learn how to handle this. |
Sorry, something went wrong.
Sorry, something went wrong.
Codecov ReportAttention: Patch coverage is 54.54545% with 5 lines in your changes missing coverage. Please review.
@@ Coverage Diff @@
## main #56934 +/- ##
==========================================
+ Coverage 89.15% 89.17% +0.01%
==========================================
Files 665 665
Lines 192798 192800 +2
Branches 37130 37121 -9
==========================================
+ Hits 171886 171921 +35
+ Misses 13673 13670 -3
+ Partials 7239 7209 -30
|
Sorry, something went wrong.
|
@joyeecheung It looks like all checks passed except the first git commit message one, where I must explicitly put the GitHub link. Should I just amend the first commit message and push it here? |
Sorry, something went wrong.
|
Yes, you'll need to update it to pull a full GitHub link |
Sorry, something went wrong.
|
Hmm, I think you'll need to rebase against the latest main branch and drop the other commits that you've pulled in somehow from the main branch. You can use use something like git fetch origin main then git rebase origin/main -i and remove the unrelated commits. |
Sorry, something went wrong.
Update fs.rmSync to properly handle file paths that include non-ASCII characters. This change prevents crashes and errors when attempting to delete files with international or special characters in their names. Add two tests in test/parallel to ensure that files with non-ASCII characters can be deleted without issues. This covers cases that previously caused unexpected behavior or crashes on certain file systems. Fixes: #56049
|
@joyeecheung Thanks for the suggestion! It worked. Learned a lof things! |
Sorry, something went wrong.
| return env->ThrowErrnoException(ENOTDIR, "rm", message.c_str(), path_c_str); | ||
| } else if (error == std::errc::permission_denied) { | ||
| std::string message = "Permission denied: " + file_path_str; | ||
| std::string message = "Permission denied: "; |
There was a problem hiding this comment.
Why did you remove the paths from the error messages?
Sorry, something went wrong.
There was a problem hiding this comment.
This was giving erroneous path if the path contains any non-ASCII character, both in Linux and Windows. The file path actually is passed as path_c_str and added to the error messages in env->ThrowErrnoException( permission_denied_error, "rm", message.c_str(), path_c_str);
In the test file, I explicitly checked whether the err.path is correct and the path is in the err.message.
Sorry, something went wrong.
There was a problem hiding this comment.
@anonrig please review this when you are free.
Sorry, something went wrong.
There was a problem hiding this comment.
Yes, the path here seems redundant, ThrowErrnoException would format it into something like ${message} , '${path}'. The original message is actually showing the path in the error message twice.
Sorry, something went wrong.
| if (path != nullptr) { | ||
| // FIXME(bnoordhuis) It's questionable to interpret the file path as UTF-8. | ||
| path_string = String::NewFromUtf8(isolate, path).ToLocalChecked(); | ||
| path_string = StringFromPath(isolate, path); |
There was a problem hiding this comment.
This FIXME should not be removed, isn't it?
Sorry, something went wrong.
There was a problem hiding this comment.
I think It was needed because of String::NewFromUtf8 right after here. Now that I am using StringFromPath, it's no longer needed here.
If you want me to put it back, I can do this.
Sorry, something went wrong.
There was a problem hiding this comment.
I think this dates waaay back and it's possible that some other path is passing a wide string from Windows to this that's not originated from JS but from some Windows API. So this should probably still be left as-is.
Sorry, something went wrong.
There was a problem hiding this comment.
Also it doesn't look like a good idea to update ErrnoException in this PR, this is shared by too many things. Please submit a separate PR for this.
Sorry, something went wrong.
|
@joyeecheung It looks like somebody is working on the error codes. The original goal was to handle non-ASCII characters by using the macro to fix bug #56049, and causing conflicts here. The main problem is still there. I think I should I should first use the macro BufferValueToPath to fix the conversion. Then I should work on the error messages later! Otherwise, it will always be conflict! Should I open a new PR and solve the bug first? |
Sorry, something went wrong.
Hi @Yeaseen, following up on the status here. |
Sorry, something went wrong.
|
@Yuchen-Dai, I will create a new PR next week to fix the bug #56049 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This is a fresh version of PR #56117
Update fs.rmSync to properly handle file paths that include non-ASCII characters. This change prevents crashes and errors when attempting to delete files with international or special characters in their names.
Add two tests in test/parallel/ to ensure that files with non-ASCII characters can be deleted without issues. This covers cases that previously caused unexpected behavior or crashes on certain file systems.
Fixes: #56049
@lemire I had to close the previous PR due to some conflicts. Please review this. Thank you!