Commit 94f9e789 authored by Jason Edmeades's avatar Jason Edmeades Committed by Alexandre Julliard

cmd: Fix rmdir error during recursive delete.

parent 514eb695
......@@ -1827,6 +1827,10 @@ void WCMD_remove_dir (WCHAR *command) {
lpDir.pFrom = thisArg;
lpDir.fFlags = FOF_SILENT | FOF_NOCONFIRMATION | FOF_NOERRORUI;
lpDir.wFunc = FO_DELETE;
/* SHFileOperationW needs file list with a double null termination */
thisArg[lstrlenW(thisArg) + 1] = 0x00;
if (SHFileOperationW(&lpDir)) WCMD_print_error ();
}
}
......
......@@ -1163,7 +1163,7 @@ if not exist foo (
)
mkdir foo\bar\baz
echo foo > foo\bar\brol
rmdir /s /Q foo
rmdir /s /Q foo 2>&1
if not exist foo (
echo recursive rmdir succeeded
) else (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment