Rebase against e3d2620bdf6f8e91a5ccf5904f256a55a5af137e.

This commit is contained in:
Alistair Leslie-Hughes 2024-08-29 07:37:28 +10:00
parent f43640039b
commit 041773cac4
5 changed files with 1 additions and 210 deletions

View File

@ -1,79 +0,0 @@
From 2f9fa2d492521d297eb87e4b6709d8349818b9c6 Mon Sep 17 00:00:00 2001
From: Jason Edmeades <us@edmeades.me.uk>
Date: Tue, 16 Jul 2019 13:51:58 +1000
Subject: [PATCH] cmd: ftype failed to clear file associations
If a file association was set (e.g. ftype fred=xxx), ftype fred= needs to clear it,
but previously it failed to do so.
---
programs/cmd/builtins.c | 6 +++---
programs/cmd/tests/test_builtins.cmd | 9 +++++++++
programs/cmd/tests/test_builtins.cmd.exp | 5 ++++-
3 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/programs/cmd/builtins.c b/programs/cmd/builtins.c
index 1c39c35ca78..f23f9ef2046 100644
--- a/programs/cmd/builtins.c
+++ b/programs/cmd/builtins.c
@@ -4101,11 +4101,11 @@ void WCMD_assoc (const WCHAR *args, BOOL assoc) {
/* If nothing after '=' then clear value - only valid for ASSOC */
if (*newValue == 0x00) {
- if (assoc) rc = RegDeleteKeyW(key, args);
- if (assoc && rc == ERROR_SUCCESS) {
+ rc = RegDeleteTreeW(key, args);
+ if (rc == ERROR_SUCCESS) {
WINE_TRACE("HKCR Key '%s' deleted\n", wine_dbgstr_w(args));
- } else if (assoc && rc != ERROR_FILE_NOT_FOUND) {
+ } else if (rc != ERROR_FILE_NOT_FOUND) {
WCMD_print_error();
errorlevel = ERROR_FILE_NOT_FOUND;
diff --git a/programs/cmd/tests/test_builtins.cmd b/programs/cmd/tests/test_builtins.cmd
index d5397560bc6..14666c85cac 100644
--- a/programs/cmd/tests/test_builtins.cmd
+++ b/programs/cmd/tests/test_builtins.cmd
@@ -2670,6 +2670,12 @@ echo echo +++>> tmp.cmd
echo ftype footype>> tmp.cmd
cmd /c tmp.cmd
+echo --- testing association
+ftype footype=cmd.exe /c "echo '%%1'"
+echo dummy>test.foo
+test.foo
+del test.foo
+
echo --- resetting association
assoc .foo=
@@ -2701,6 +2707,9 @@ echo .foo=footype
echo footype=foo_opencmd
echo +++
echo footype=foo_opencmd
+echo --- testing association
+echo footype=cmd.exe /c "echo '%%1'"
+echo Skipped as not enough permissions
echo --- resetting association
echo original value
diff --git a/programs/cmd/tests/test_builtins.cmd.exp b/programs/cmd/tests/test_builtins.cmd.exp
index 0102c3bcbc5..a6d97bc8248 100644
--- a/programs/cmd/tests/test_builtins.cmd.exp
+++ b/programs/cmd/tests/test_builtins.cmd.exp
@@ -1549,8 +1549,11 @@ footype=foo_opencmd
footype=foo_opencmd
+++
footype=foo_opencmd
+--- testing association
+footype=cmd.exe /c "echo '%1'"
+'@drive@@path@foobar\test.foo'@or_broken@Skipped as not enough permissions
--- resetting association
-@todo_wine@original value@or_broken@buggyXP@or_broken@!WINE_FOO!
+original value@or_broken@buggyXP@or_broken@!WINE_FOO!
------------ Testing CALL ------------
--- external script
foo@space@
--
2.43.0

View File

@ -1 +0,0 @@
Fixes: [18154] cmd: Support for launching programs based on file association

View File

@ -1,33 +0,0 @@
From b2a461e789d8602012328811451a39ebd4bb849d Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Wed, 28 Aug 2024 05:10:00 +1000
Subject: [PATCH] odbc32: SQLColAttribute/W pass through field id
SQL_MAX_COLUMNS_IN_TABLE
---
dlls/odbc32/proxyodbc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
index 49e16b1df08..26f38d63b63 100644
--- a/dlls/odbc32/proxyodbc.c
+++ b/dlls/odbc32/proxyodbc.c
@@ -1003,6 +1003,7 @@ static SQLRETURN col_attribute_win32_a( struct statement *stmt, SQLUSMALLINT col
case SQL_COLUMN_TYPE:
case SQL_COLUMN_DISPLAY_SIZE:
+ case SQL_MAX_COLUMNS_IN_TABLE:
break;
default:
@@ -6188,6 +6189,7 @@ static SQLRETURN col_attribute_win32_w( struct statement *stmt, SQLUSMALLINT col
case SQL_COLUMN_TYPE:
case SQL_COLUMN_DISPLAY_SIZE:
+ case SQL_MAX_COLUMNS_IN_TABLE:
break;
default:
--
2.45.2

View File

@ -1,96 +0,0 @@
From a3e36e081e53a3e6b7275c27bc1e92ad555ad1b9 Mon Sep 17 00:00:00 2001
From: Alistair Leslie-Hughes <leslie_alistair@hotmail.com>
Date: Wed, 28 Aug 2024 05:25:23 +1000
Subject: [PATCH] odbc32: SQLColAttribute/W Correcly convert columns ID for
ODBC v2.0
The current conversion is converting ODBC 2 to 3 which is backwards.
---
dlls/odbc32/proxyodbc.c | 56 ++++++++++++++++++++++++++++++++---------
1 file changed, 44 insertions(+), 12 deletions(-)
diff --git a/dlls/odbc32/proxyodbc.c b/dlls/odbc32/proxyodbc.c
index 26f38d63b63..b0a7bf498e6 100644
--- a/dlls/odbc32/proxyodbc.c
+++ b/dlls/odbc32/proxyodbc.c
@@ -989,16 +989,32 @@ static SQLRETURN col_attribute_win32_a( struct statement *stmt, SQLUSMALLINT col
switch (field_id)
{
- case SQL_COLUMN_COUNT:
- field_id = SQL_DESC_COUNT;
+ case SQL_DESC_COUNT:
+ field_id = SQL_COLUMN_COUNT;
break;
- case SQL_COLUMN_NAME:
- field_id = SQL_DESC_NAME;
+ case SQL_DESC_TYPE:
+ field_id = SQL_COLUMN_TYPE;
break;
- case SQL_COLUMN_NULLABLE:
- field_id = SQL_DESC_NULLABLE;
+ case SQL_DESC_LENGTH:
+ field_id = SQL_COLUMN_LENGTH;
+ break;
+
+ case SQL_DESC_PRECISION:
+ field_id = SQL_COLUMN_PRECISION;
+ break;
+
+ case SQL_DESC_SCALE:
+ field_id = SQL_COLUMN_SCALE;
+ break;
+
+ case SQL_DESC_NULLABLE:
+ field_id = SQL_COLUMN_NULLABLE;
+ break;
+
+ case SQL_DESC_NAME:
+ field_id = SQL_COLUMN_NAME;
break;
case SQL_COLUMN_TYPE:
@@ -6175,16 +6191,32 @@ static SQLRETURN col_attribute_win32_w( struct statement *stmt, SQLUSMALLINT col
switch (field_id)
{
- case SQL_COLUMN_COUNT:
- field_id = SQL_DESC_COUNT;
+ case SQL_DESC_COUNT:
+ field_id = SQL_COLUMN_COUNT;
break;
- case SQL_COLUMN_NAME:
- field_id = SQL_DESC_NAME;
+ case SQL_DESC_TYPE:
+ field_id = SQL_COLUMN_TYPE;
break;
- case SQL_COLUMN_NULLABLE:
- field_id = SQL_DESC_NULLABLE;
+ case SQL_DESC_LENGTH:
+ field_id = SQL_COLUMN_LENGTH;
+ break;
+
+ case SQL_DESC_PRECISION:
+ field_id = SQL_COLUMN_PRECISION;
+ break;
+
+ case SQL_DESC_SCALE:
+ field_id = SQL_COLUMN_SCALE;
+ break;
+
+ case SQL_DESC_NULLABLE:
+ field_id = SQL_COLUMN_NULLABLE;
+ break;
+
+ case SQL_DESC_NAME:
+ field_id = SQL_COLUMN_NAME;
break;
case SQL_COLUMN_TYPE:
--
2.45.2

View File

@ -1 +1 @@
b01131ce82ad8306d719f9919e6249af2db5322d
e3d2620bdf6f8e91a5ccf5904f256a55a5af137e