-
Notifications
You must be signed in to change notification settings - Fork 3.8k
win, fs: uv_fs_fchmod support for -A files #1819
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
bnoordhuis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: read-only
| SET_REQ_WIN32_ERROR(req, pRtlNtStatusToDosError(nt_status)); | ||
| goto fchmod_cleanup; | ||
| } | ||
| /* Remeber to clear the flag later on */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: remember
| if (!NT_SUCCESS(nt_status)) { | ||
| SET_REQ_WIN32_ERROR(req, pRtlNtStatusToDosError(nt_status)); | ||
| goto fchmod_cleanup; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo: delete
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
test/test-fs.c
Outdated
| uv_fs_req_cleanup(&close_req); | ||
|
|
||
| acl_cleanup: | ||
| /* Cleanup */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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 <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
|
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 <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: James M Snell <[email protected]>
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 <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: James M Snell <[email protected]>
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 <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: James M Snell <[email protected]>
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 <[email protected]> Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Santiago Gimeno <[email protected]> Reviewed-By: James M Snell <[email protected]>
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