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