cmd: Fix sharing permissions of piped output files.
Signed-off-by: Sebastian Lackner <sebastian@fds-team.de> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
fedfe2ea2e
commit
c634f34aae
|
@ -1207,7 +1207,7 @@ passed
|
||||||
--- a batch file can delete itself
|
--- a batch file can delete itself
|
||||||
file correctly deleted
|
file correctly deleted
|
||||||
--- a batch file can alter itself
|
--- a batch file can alter itself
|
||||||
@todo_wine@bar
|
bar
|
||||||
---------- Testing copy
|
---------- Testing copy
|
||||||
Passed: Found expected dummy.file
|
Passed: Found expected dummy.file
|
||||||
Passed: Found expected dir1\file1
|
Passed: Found expected dir1\file1
|
||||||
|
|
|
@ -1364,7 +1364,7 @@ void WCMD_execute (const WCHAR *command, const WCHAR *redirects,
|
||||||
if (cmdList && (*cmdList)->pipeFile[0] != 0x00) {
|
if (cmdList && (*cmdList)->pipeFile[0] != 0x00) {
|
||||||
WINE_TRACE("Input coming from %s\n", wine_dbgstr_w((*cmdList)->pipeFile));
|
WINE_TRACE("Input coming from %s\n", wine_dbgstr_w((*cmdList)->pipeFile));
|
||||||
h = CreateFileW((*cmdList)->pipeFile, GENERIC_READ,
|
h = CreateFileW((*cmdList)->pipeFile, GENERIC_READ,
|
||||||
FILE_SHARE_READ, &sa, OPEN_EXISTING,
|
FILE_SHARE_READ | FILE_SHARE_WRITE, &sa, OPEN_EXISTING,
|
||||||
FILE_ATTRIBUTE_NORMAL | FILE_FLAG_DELETE_ON_CLOSE, NULL);
|
FILE_ATTRIBUTE_NORMAL | FILE_FLAG_DELETE_ON_CLOSE, NULL);
|
||||||
if (h == INVALID_HANDLE_VALUE) {
|
if (h == INVALID_HANDLE_VALUE) {
|
||||||
WCMD_print_error ();
|
WCMD_print_error ();
|
||||||
|
@ -1425,8 +1425,8 @@ void WCMD_execute (const WCHAR *command, const WCHAR *redirects,
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
WCHAR *param = WCMD_parameter(p, 0, NULL, FALSE, FALSE);
|
WCHAR *param = WCMD_parameter(p, 0, NULL, FALSE, FALSE);
|
||||||
h = CreateFileW(param, GENERIC_WRITE, 0, &sa, creationDisposition,
|
h = CreateFileW(param, GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_DELETE,
|
||||||
FILE_ATTRIBUTE_NORMAL, NULL);
|
&sa, creationDisposition, FILE_ATTRIBUTE_NORMAL, NULL);
|
||||||
if (h == INVALID_HANDLE_VALUE) {
|
if (h == INVALID_HANDLE_VALUE) {
|
||||||
WCMD_print_error ();
|
WCMD_print_error ();
|
||||||
heap_free(cmd);
|
heap_free(cmd);
|
||||||
|
|
Loading…
Reference in New Issue