Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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
wine
wine-winehq
Commits
2b9649d9
Commit
2b9649d9
authored
Jun 02, 2013
by
Jason Edmeades
Committed by
Alexandre Julliard
Jun 04, 2013
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cmd: Fix tilda parameter expansion when arg is empty.
parent
dc4dd0cb
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
batch.c
programs/cmd/batch.c
+7
-5
test_builtins.cmd
programs/cmd/tests/test_builtins.cmd
+1
-0
test_builtins.cmd.exp
programs/cmd/tests/test_builtins.cmd.exp
+1
-0
No files found.
programs/cmd/batch.c
View file @
2b9649d9
...
@@ -514,11 +514,13 @@ void WCMD_HandleTildaModifiers(WCHAR **start, BOOL atExecute)
...
@@ -514,11 +514,13 @@ void WCMD_HandleTildaModifiers(WCHAR **start, BOOL atExecute)
/* After this, we need full information on the file,
/* After this, we need full information on the file,
which is valid not to exist. */
which is valid not to exist. */
if
(
!
skipFileParsing
)
{
if
(
!
skipFileParsing
)
{
if
(
GetFullPathNameW
(
outputparam
,
MAX_PATH
,
fullfilename
,
NULL
)
==
0
)
if
(
GetFullPathNameW
(
outputparam
,
MAX_PATH
,
fullfilename
,
NULL
)
==
0
)
{
return
;
exists
=
FALSE
;
fullfilename
[
0
]
=
0x00
;
exists
=
GetFileAttributesExW
(
fullfilename
,
GetFileExInfoStandard
,
}
else
{
&
fileInfo
);
exists
=
GetFileAttributesExW
(
fullfilename
,
GetFileExInfoStandard
,
&
fileInfo
);
}
/* 2. Handle 'a' : Output attributes (File doesn't have to exist) */
/* 2. Handle 'a' : Output attributes (File doesn't have to exist) */
if
(
memchrW
(
firstModifier
,
'a'
,
modifierLen
)
!=
NULL
)
{
if
(
memchrW
(
firstModifier
,
'a'
,
modifierLen
)
!=
NULL
)
{
...
...
programs/cmd/tests/test_builtins.cmd
View file @
2b9649d9
...
@@ -363,6 +363,7 @@ for %%i in ("d e" f) do echo %%~dpi
...
@@ -363,6 +363,7 @@ for %%i in ("d e" f) do echo %%~dpi
for %%i in ("g h" i) do echo %%~sdi
for %%i in ("g h" i) do echo %%~sdi
for %%i in ("g h" i) do echo %%~dsi
for %%i in ("g h" i) do echo %%~dsi
for %%i in ("j k" l.eh) do echo '%%~xsi'
for %%i in ("j k" l.eh) do echo '%%~xsi'
for %%i in ("") do echo '%%~i,%%~fi,%%~di,%%~pi,%%~ni,%%~xi,%%~si,%%~ai,%%~ti,%%~zi'
echo --- in parameters
echo --- in parameters
for %%i in ("A B" C) do call :echoFun %%i
for %%i in ("A B" C) do call :echoFun %%i
...
...
programs/cmd/tests/test_builtins.cmd.exp
View file @
2b9649d9
...
@@ -319,6 +319,7 @@ N
...
@@ -319,6 +319,7 @@ N
@drive@
@drive@
''
''
'.eh'
'.eh'
',,,,,,,,,'
--- in parameters
--- in parameters
"A B"
"A B"
C
C
...
...
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