Commit a33bad1e authored by Frédéric Delanoy's avatar Frédéric Delanoy Committed by Alexandre Julliard

cmd: Allow a batch file to delete itself.

parent cb63445b
...@@ -51,7 +51,7 @@ void WCMD_batch (WCHAR *file, WCHAR *command, int called, WCHAR *startLabel, HAN ...@@ -51,7 +51,7 @@ void WCMD_batch (WCHAR *file, WCHAR *command, int called, WCHAR *startLabel, HAN
BATCH_CONTEXT *prev_context; BATCH_CONTEXT *prev_context;
if (startLabel == NULL) { if (startLabel == NULL) {
h = CreateFileW (file, GENERIC_READ, FILE_SHARE_READ, h = CreateFileW (file, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE,
NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL); NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (h == INVALID_HANDLE_VALUE) { if (h == INVALID_HANDLE_VALUE) {
SetLastError (ERROR_FILE_NOT_FOUND); SetLastError (ERROR_FILE_NOT_FOUND);
......
...@@ -725,7 +725,7 @@ foo '' ...@@ -725,7 +725,7 @@ foo ''
non-builtin dir non-builtin dir
------------ Testing cmd invocation ------------ ------------ Testing cmd invocation ------------
... a batch file can delete itself ... ... a batch file can delete itself ...
@todo_wine@file correctly deleted file correctly deleted
... a batch file can alter itself ... ... a batch file can alter itself ...
@todo_wine@bar @todo_wine@bar
------------ Testing setlocal/endlocal ------------ ------------ Testing setlocal/endlocal ------------
......
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