| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
There was a problem hiding this comment.
LGTM with the linter issues addressed
Sorry, something went wrong.
Codecov ReportAttention: Patch coverage is 53.73134% with 31 lines in your changes missing coverage. Please review.
@@ Coverage Diff @@
## main #56117 +/- ##
==========================================
- Coverage 89.22% 89.16% -0.06%
==========================================
Files 663 665 +2
Lines 191974 192604 +630
Branches 36926 37055 +129
==========================================
+ Hits 171286 171742 +456
- Misses 13561 13664 +103
- Partials 7127 7198 +71
|
Sorry, something went wrong.
|
Can you please update your first commit message to follow the guideline, i.e. each line needs to be below 72 chars. Also there are some linting issues in your js test. |
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 a test 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
|
@jazelly I made the updates for the first commit message and linter issues. I think it should be fine now. |
Sorry, something went wrong.
|
@jazelly This time a linter issue: I didn't put a newline at the end of the test file. I am learning new things! Thanks for your understanding. |
Sorry, something went wrong.
|
@jazelly @joyeecheung It's updated based on the review. |
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
We have Tou8StringView() function thats added in #54653, why don't we use it? I don't see any reason to add a new implementation for this. @joyeecheung @nodejs/cpp-reviewers
Sorry, something went wrong.
|
This doesn't add new implementation of the conversion, it just moves existing conversion macros to somewhere earlier so that it can be used in an earlier function. If you want the conversion macros to use ToU8StringView() instead of via wide strings, I think it would be better if you open a separate PR to update these macros. For the purpose of fixing this bug, which has an increasing amount of reports being filed, I think what's done in this PR is adequate, and there is no need to block a bug fix because the existing helper it uses could've been worked better in a separate PR. |
Sorry, something went wrong.
|
I agree with @joyeecheung here. The conversion to use ToU8StringView() can be done separately. |
Sorry, something went wrong.
|
It looks like the CI is failing on Windows: ---
duration_ms: 198.975
exitcode: 1
severity: fail
stack: |-
node:internal/assert/utils:281
throw err;
^
AssertionError [ERR_ASSERTION]: Error message should include the path treated as a directory
at Object.<anonymous> (C:\workspace\node-test-binary-windows-js-suites\node\test\parallel\test-fs-rmSync-special-char.js:41:3)
at expectedException (node:assert:808:17)
at expectsError (node:assert:931:3)
at Function.throws (node:assert:986:3)
at Object.<anonymous> (C:\workspace\node-test-binary-windows-js-suites\node\test\parallel\test-fs-rmSync-special-char.js:37:8)
at Module._compile (node:internal/modules/cjs/loader:1738:14)
at Object..js (node:internal/modules/cjs/loader:1903:10)
at Module.load (node:internal/modules/cjs/loader:1473:32)
at Function._load (node:internal/modules/cjs/loader:1285:12)
at TracingChannel.traceSync (node:diagnostics_channel:322:14) {
generatedMessage: false,
code: 'ERR_ASSERTION',
actual: false,
expected: true,
operator: '=='
}
Node.js v24.0.0-pre
...
|
Sorry, something went wrong.
It seems to fail on the additional test that is being added. @Yeaseen Did you test it under Windows? |
Sorry, something went wrong.
|
@lemire No. I will be trying this on Windows. I thought it was a simple fix. |
Sorry, something went wrong.
Famous last words. 😄 |
Sorry, something went wrong.
|
@joyeecheung I think I figured out the main problem: it was in src/api/exceptions.cc file. I tested both on Windows 11 and Ubuntu 22.04 There's some conflict, making the last few commits messy. Sorry about that. |
Sorry, something went wrong.
|
@lemire could you please review this and start a CI? I tested this locally, though. Thank you. |
Sorry, something went wrong.
Sorry, something went wrong.
|
There's a conflict because some other code already modified what I worked on. I am gonna do this task on a fresh PR |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This is my first pull request here and I read the contribution guide and commit guide.
Update fs.rmSync in src/node_file.cc 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 a test in test/parallel/test-fs-rmSync-special-char.js to ensure that files with non-ASCII characters can be deleted without issues, covering cases that previously led to unexpected behavior or crashes on certain file systems.
Fixes: #56049
For building the node and running the tests, I used: