cmd: Allow a batch file to delete itself.
This commit is contained in:
parent
cb63445b5e
commit
a33bad1edd
|
@ -51,7 +51,7 @@ void WCMD_batch (WCHAR *file, WCHAR *command, int called, WCHAR *startLabel, HAN
|
|||
BATCH_CONTEXT *prev_context;
|
||||
|
||||
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);
|
||||
if (h == INVALID_HANDLE_VALUE) {
|
||||
SetLastError (ERROR_FILE_NOT_FOUND);
|
||||
|
|
|
@ -725,7 +725,7 @@ foo ''
|
|||
non-builtin dir
|
||||
------------ Testing cmd invocation ------------
|
||||
... a batch file can delete itself ...
|
||||
@todo_wine@file correctly deleted
|
||||
file correctly deleted
|
||||
... a batch file can alter itself ...
|
||||
@todo_wine@bar
|
||||
------------ Testing setlocal/endlocal ------------
|
||||
|
|
Loading…
Reference in New Issue