Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
825920a0
Commit
825920a0
authored
May 25, 2005
by
Aric Stewart
Committed by
Alexandre Julliard
May 25, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Implement the [!file] format to produce the short filename.
parent
ef73685e
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
2 deletions
+29
-2
format.c
dlls/msi/format.c
+29
-2
No files found.
dlls/msi/format.c
View file @
825920a0
...
...
@@ -101,7 +101,8 @@ static LPWSTR deformat_component(MSIPACKAGE* package, LPCWSTR key, DWORD* sz)
return
value
;
}
static
LPWSTR
deformat_file
(
MSIPACKAGE
*
package
,
LPCWSTR
key
,
DWORD
*
sz
)
static
LPWSTR
deformat_file
(
MSIPACKAGE
*
package
,
LPCWSTR
key
,
DWORD
*
sz
,
BOOL
shortname
)
{
LPWSTR
value
=
NULL
;
INT
index
;
...
...
@@ -114,9 +115,33 @@ static LPWSTR deformat_file(MSIPACKAGE* package, LPCWSTR key, DWORD* sz)
index
=
get_loaded_file
(
package
,
key
);
if
(
index
>=
0
)
{
if
(
!
shortname
)
{
value
=
strdupW
(
package
->
files
[
index
].
TargetPath
);
*
sz
=
(
strlenW
(
value
))
*
sizeof
(
WCHAR
);
}
else
{
DWORD
size
=
0
;
size
=
GetShortPathNameW
(
package
->
files
[
index
].
TargetPath
,
NULL
,
0
);
if
(
size
>
0
)
{
*
sz
=
(
size
-
1
)
*
sizeof
(
WCHAR
);
size
++
;
value
=
HeapAlloc
(
GetProcessHeap
(),
0
,
size
*
sizeof
(
WCHAR
));
GetShortPathNameW
(
package
->
files
[
index
].
TargetPath
,
value
,
size
);
}
else
{
ERR
(
"Unable to get ShortPath size (%s)
\n
"
,
debugstr_w
(
package
->
files
[
index
].
TargetPath
));
value
=
NULL
;
*
sz
=
0
;
}
}
}
return
value
;
}
...
...
@@ -378,8 +403,10 @@ static DWORD deformat_string_internal(MSIPACKAGE *package, LPCWSTR ptr,
value
=
deformat_component
(
package
,
&
key
[
1
],
&
chunk
);
break
;
case
'#'
:
value
=
deformat_file
(
package
,
&
key
[
1
],
&
chunk
,
FALSE
);
break
;
case
'!'
:
/* should be short path */
value
=
deformat_file
(
package
,
&
key
[
1
],
&
chunk
);
value
=
deformat_file
(
package
,
&
key
[
1
],
&
chunk
,
TRUE
);
break
;
case
'\\'
:
value
=
deformat_escape
(
&
key
[
1
],
&
chunk
);
...
...
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