https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7661f7826c991d5d30692…
commit 7661f7826c991d5d30692d9ceccb456000e95a12
Author: Serge Gautherie <reactos-git_serge_171003(a)gautherie.fr>
AuthorDate: Thu Oct 13 19:56:10 2022 +0200
Commit: Stanislav Motylkov <x86corez(a)gmail.com>
CommitDate: Sun Sep 1 00:18:42 2024 +0300
[ADVPACK] files.c: Properly mark Wine diff
Addendum to 6eb8a1d (0.4.15-dev-6918).
---
dll/win32/advpack/files.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/dll/win32/advpack/files.c b/dll/win32/advpack/files.c
index 6f06bf0e9ab..f373e78dda7 100644
--- a/dll/win32/advpack/files.c
+++ b/dll/win32/advpack/files.c
@@ -341,17 +341,13 @@ static HRESULT DELNODE_recurse_dirtree(LPWSTR fname, DWORD flags)
HANDLE hFindFile;
WIN32_FIND_DATAW w32fd;
BOOL done = TRUE;
- int fname_len;
-
+ int fname_len = lstrlenW(fname);
#ifdef __REACTOS__
if (flags & ADN_DEL_IF_EMPTY)
- {
goto deleteinitialdirectory;
- }
#endif
/* Generate a path with wildcard suitable for iterating */
- fname_len = lstrlenW(fname);
if (fname_len && fname[fname_len-1] != '\\') fname[fname_len++] =
'\\';
lstrcpyW(fname + fname_len, asterisk);
@@ -381,7 +377,9 @@ static HRESULT DELNODE_recurse_dirtree(LPWSTR fname, DWORD flags)
{
#ifdef __REACTOS__
deleteinitialdirectory:
+#endif
TRACE("%s: directory\n", debugstr_w(fname));
+#ifdef __REACTOS__
SetFileAttributesW(fname, FILE_ATTRIBUTE_NORMAL);
if (RemoveDirectoryW(fname))
#else
@@ -454,7 +452,7 @@ HRESULT WINAPI DelNodeW(LPCWSTR pszFileOrDirName, DWORD dwFlags)
HRESULT ret = E_FAIL;
TRACE("(%s, %d)\n", debugstr_w(pszFileOrDirName), dwFlags);
-
+
#ifdef __REACTOS__
if (dwFlags & ~ADN_DEL_IF_EMPTY)
FIXME("Flags %#x ignored!\n", dwFlags & ~ADN_DEL_IF_EMPTY);