Fixes a bug where `rundll32.exe advpack.dll,DelNodeRunDLL32 "c:\test",1` is only supposed to delete "test" if the directory is empty.
Also causes the [DelDirs Inf section](https://www.mdgx.com/INF_web/deldirs.htm) to work correctly.
Notes:
- I changed the code so it ignores the result of `SetFileAttributesW` because the user might not have FILE_WRITE_ATTRIBUTES even if they have DELETE rights. This seems to match Windows (XP NTFS).
--
v4: advpack: DelNode support ADN_DEL_IF_EMPTY flag
https://gitlab.winehq.org/wine/wine/-/merge_requests/6347
Fixes a bug where `rundll32.exe advpack.dll,DelNodeRunDLL32 "c:\test",1` is only supposed to delete "test" if the directory is empty.
Also causes the [DelDirs Inf section](https://www.mdgx.com/INF_web/deldirs.htm) to work correctly.
Notes:
- I changed the code so it ignores the result of `SetFileAttributesW` because the user might not have FILE_WRITE_ATTRIBUTES even if they have DELETE rights. This seems to match Windows (XP NTFS).
--
v3: advpack: DelNode support ADN_DEL_IF_EMPTY flag
https://gitlab.winehq.org/wine/wine/-/merge_requests/6347
On Sat Aug 24 19:23:49 2024 +0000, Vibhav Pant wrote:
> Hm, the `BroadcastSystemMessage` calls wouldn't work since the
> \`DBT_BROADCAST_DEVICEINTERFACE\` struct needs to be first constructed.
> That being said, I have tried to added code that does that to 1/4. 1/4
> also shouldn't have any `DBT_DEVTYP_HANDLE` related code anymore, let me
> know if that works.
1/4 also merges the old 1/4 commit, and has been split into 2 commits - for introducing `new_event` and friends.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6315#note_79915
On Sat Aug 24 19:22:08 2024 +0000, Elizabeth Figura wrote:
> Patch 1/4 still needs to be merged into 2/4.
> The BroadcastSystemMessage() calls seem to have been inadvertently
> removed in 2/4, and the split isn't quite complete—it still introduces
> DBT_DEVTYP_HANDLE support in plugplay_send_event(). Ideally separating
> the new_event() helper would also be a separate commit, so that you're
> not moving code and changing it at the same time.
Hm, the `BroadcastSystemMessage` calls wouldn't work since the \`DBT_BROADCAST_DEVICEINTERFACE\` struct needs to be first constructed. That being said, I have tried to added code that does that to 1/4. 1/4 also shouldn't have any `DBT_DEVTYP_HANDLE` related code anymore, let me know if that works.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6315#note_79913