win, fs: uv_fs_fchmod support for -A files#1819
Conversation
bnoordhuis
left a comment
There was a problem hiding this comment.
Wouldn't it make sense to coalesce the first NtSetInformationFile() call with the one on line 1544?
|
|
||
| /* Test if the Archive attribute is cleared */ | ||
| if ((file_info.FileAttributes & FILE_ATTRIBUTE_ARCHIVE) == 0) { | ||
| /* Set Archive flag, otherwise setting or clearing the read-olny |
| SET_REQ_WIN32_ERROR(req, pRtlNtStatusToDosError(nt_status)); | ||
| goto fchmod_cleanup; | ||
| } | ||
| /* Remeber to clear the flag later on */ |
| if (!NT_SUCCESS(nt_status)) { | ||
| SET_REQ_WIN32_ERROR(req, pRtlNtStatusToDosError(nt_status)); | ||
| goto fchmod_cleanup; | ||
| } |
There was a problem hiding this comment.
Can you fix the indentation? It should be two spaces, not four.
| Based on Node.js test from | ||
| https://github.com/nodejs/node/commit/3ba81e34e86a5c32658e218cb6e65b13e8326bc5 | ||
|
|
||
| If anything goes wrong, you can delte the test_fle_icacls with: |
| r = call_icacls("icacls test_file_icacls /inheritance:r /remove \"%s\"", | ||
| pwd.username); | ||
| if (r != 0) { | ||
| goto acl_cleanup; |
There was a problem hiding this comment.
Indent errors in this file too.
|
Updated, PTAL. When developing this it looked like |
|
Can you also run the libuv-in-node CI job on this PR prior to landing. |
| uv_fs_req_cleanup(&close_req); | ||
|
|
||
| acl_cleanup: | ||
| /* Cleanup */ |
There was a problem hiding this comment.
Superfluous comment. As a general observation, most of the comments just say what the code does, not why; not that useful. I'd remove them.
| } | ||
| #endif | ||
|
|
||
| #ifdef _WIN32 |
There was a problem hiding this comment.
You can fold this into the previous #ifdef block.
|
Updated, PTAL. CI: https://ci.nodejs.org/view/libuv/job/libuv-test-commit/822/ |
Adds uv_fs_chmod support for files with the Archive attribute cleared Ref: libuv#1777 Ref: nodejs/node#12803 PR-URL: libuv#1819
a83ea33 to
fcb058f
Compare
|
Old CI 404, rebased, new CI CI node: https://ci.nodejs.org/view/libuv/job/libuv-in-node/18/ |
Adds uv_fs_chmod support for files with the Archive attribute cleared Ref: #1777 Ref: nodejs/node#12803 PR-URL: #1819 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
|
Failures unrelated, landed in b59fc58 |
Notable changes: - Building via cmake is now supported. PR-URL: libuv/libuv#1850 - Stricter checks have been added to prevent watching the same file descriptor multiple times. PR-URL: libuv/libuv#1851 Refs: nodejs#3604 - An IPC deadlock on Windows has been fixed. PR-URL: libuv/libuv#1843 Fixes: nodejs#9706 Fixes: nodejs#7657 - uv_fs_lchown() has been added. PR-URL: libuv/libuv#1826 Refs: nodejs#19868 - uv_fs_copyfile() sets errno on error. PR-URL: libuv/libuv#1881 Fixes: nodejs#21329 - uv_fs_fchmod() supports -A files on Windows. PR-URL: libuv/libuv#1819 Refs: nodejs#12803 PR-URL: nodejs#21466 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Notable changes: - Building via cmake is now supported. PR-URL: libuv/libuv#1850 - Stricter checks have been added to prevent watching the same file descriptor multiple times. PR-URL: libuv/libuv#1851 Refs: #3604 - An IPC deadlock on Windows has been fixed. PR-URL: libuv/libuv#1843 Fixes: #9706 Fixes: #7657 - uv_fs_lchown() has been added. PR-URL: libuv/libuv#1826 Refs: #19868 - uv_fs_copyfile() sets errno on error. PR-URL: libuv/libuv#1881 Fixes: #21329 - uv_fs_fchmod() supports -A files on Windows. PR-URL: libuv/libuv#1819 Refs: #12803 PR-URL: #21466 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Notable changes: - Building via cmake is now supported. PR-URL: libuv/libuv#1850 - Stricter checks have been added to prevent watching the same file descriptor multiple times. PR-URL: libuv/libuv#1851 Refs: nodejs#3604 - An IPC deadlock on Windows has been fixed. PR-URL: libuv/libuv#1843 Fixes: nodejs#9706 Fixes: nodejs#7657 - uv_fs_lchown() has been added. PR-URL: libuv/libuv#1826 Refs: nodejs#19868 - uv_fs_copyfile() sets errno on error. PR-URL: libuv/libuv#1881 Fixes: nodejs#21329 - uv_fs_fchmod() supports -A files on Windows. PR-URL: libuv/libuv#1819 Refs: nodejs#12803 PR-URL: nodejs#21466 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Notable changes: - Building via cmake is now supported. PR-URL: libuv/libuv#1850 - Stricter checks have been added to prevent watching the same file descriptor multiple times. PR-URL: libuv/libuv#1851 Refs: #3604 - An IPC deadlock on Windows has been fixed. PR-URL: libuv/libuv#1843 Fixes: #9706 Fixes: #7657 - uv_fs_lchown() has been added. PR-URL: libuv/libuv#1826 Refs: #19868 - uv_fs_copyfile() sets errno on error. PR-URL: libuv/libuv#1881 Fixes: #21329 - uv_fs_fchmod() supports -A files on Windows. PR-URL: libuv/libuv#1819 Refs: #12803 Backport-PR-URL: #24103 PR-URL: #21466 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Adds
uv_fs_chmodsupport for files with the Archive attribute cleared.This PR assumes that #1818 landed, for the regression test.
Ref: #1777
Ref: nodejs/node#12803