Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Aleksandr Isakov
wine-fonts
Commits
4eddbb0a
Commit
4eddbb0a
authored
Jul 16, 2019
by
Jason Edmeades
Committed by
Vitaly Lipatov
Jul 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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.
parent
65322d2c
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
4 deletions
+16
-4
builtins.c
programs/cmd/builtins.c
+3
-3
test_builtins.cmd
programs/cmd/tests/test_builtins.cmd
+9
-0
test_builtins.cmd.exp
programs/cmd/tests/test_builtins.cmd.exp
+4
-1
No files found.
programs/cmd/builtins.c
View file @
4eddbb0a
...
...
@@ -4901,11 +4901,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
=
RegDeleteKey
W
(
key
,
args
);
if
(
assoc
&&
rc
==
ERROR_SUCCESS
)
{
rc
=
RegDeleteTree
W
(
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
=
2
;
...
...
programs/cmd/tests/test_builtins.cmd
View file @
4eddbb0a
...
...
@@ -2485,6 +2485,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=
...
...
@@ -2516,6 +2522,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
...
...
programs/cmd/tests/test_builtins.cmd.exp
View file @
4eddbb0a
...
...
@@ -1469,8 +1469,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@
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment