Rebase against 07544942e2c9c2f35263adb5104998f18967dc6c.

This commit is contained in:
Alistair Leslie-Hughes
2024-06-27 08:37:31 +10:00
parent 7fc08a960b
commit 1b9ef03b2c
5 changed files with 65 additions and 61 deletions

View File

@@ -1,4 +1,4 @@
From f0248f536027bb22efae2f92e180046c075a87c1 Mon Sep 17 00:00:00 2001
From 1e7b6a812b248a8344076a402fc97bd60da495d1 Mon Sep 17 00:00:00 2001
From: Jason Edmeades <us@edmeades.me.uk>
Date: Tue, 16 Jul 2019 13:49:18 +1000
Subject: [PATCH] cmd: Support for launching programs based on file association
@@ -15,10 +15,10 @@ Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=36646
1 file changed, 102 insertions(+), 37 deletions(-)
diff --git a/programs/cmd/wcmdmain.c b/programs/cmd/wcmdmain.c
index ce083e710f7..2aad90e350d 100644
index 12d3db1b012..0f222f3640b 100644
--- a/programs/cmd/wcmdmain.c
+++ b/programs/cmd/wcmdmain.c
@@ -1483,8 +1483,10 @@ void WCMD_run_program (WCHAR *command, BOOL called)
@@ -1494,8 +1494,10 @@ void WCMD_run_program (WCHAR *command, BOOL called)
/* 1. If extension supplied, see if that file exists */
if (extensionsupplied) {
@@ -30,7 +30,7 @@ index ce083e710f7..2aad90e350d 100644
}
}
@@ -1514,6 +1516,7 @@ void WCMD_run_program (WCHAR *command, BOOL called)
@@ -1525,6 +1527,7 @@ void WCMD_run_program (WCHAR *command, BOOL called)
}
if (GetFileAttributesW(thisDir) != INVALID_FILE_ATTRIBUTES) {
@@ -38,14 +38,17 @@ index ce083e710f7..2aad90e350d 100644
found = TRUE;
thisExt = NULL;
}
@@ -1535,52 +1538,114 @@ void WCMD_run_program (WCHAR *command, BOOL called)
@@ -1546,6 +1549,7 @@ void WCMD_run_program (WCHAR *command, BOOL called)
/* Special case BAT and CMD */
if (ext && (!wcsicmp(ext, L".bat") || !wcsicmp(ext, L".cmd"))) {
BOOL oldinteractive = interactive;
+ WINE_TRACE("Calling batch program\n");
interactive = FALSE;
WCMD_batch (thisDir, command, called, NULL, INVALID_HANDLE_VALUE);
WCMD_batch(thisDir, command, NULL, INVALID_HANDLE_VALUE);
interactive = oldinteractive;
@@ -1554,48 +1558,109 @@ void WCMD_run_program (WCHAR *command, BOOL called)
context->skip_rest = TRUE;
}
return;
- } else {
- DWORD exit_code;