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
ef1b0cac
Commit
ef1b0cac
authored
Sep 10, 2008
by
Rob Shearman
Committed by
Alexandre Julliard
Sep 10, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Reduce destination file name used in the MoveFiles action to the long file name.
Add a test for this behaviour.
parent
e738f614
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
6 deletions
+20
-6
action.c
dlls/msi/action.c
+16
-6
install.c
dlls/msi/tests/install.c
+4
-0
No files found.
dlls/msi/action.c
View file @
ef1b0cac
...
...
@@ -5564,7 +5564,8 @@ static UINT ITERATE_MoveFiles( MSIRECORD *rec, LPVOID param )
{
MSIPACKAGE
*
package
=
param
;
MSICOMPONENT
*
comp
;
LPCWSTR
sourcename
,
destname
;
LPCWSTR
sourcename
;
LPWSTR
destname
=
NULL
;
LPWSTR
sourcedir
=
NULL
,
destdir
=
NULL
;
LPWSTR
source
=
NULL
,
dest
=
NULL
;
int
options
;
...
...
@@ -5582,7 +5583,6 @@ static UINT ITERATE_MoveFiles( MSIRECORD *rec, LPVOID param )
}
sourcename
=
MSI_RecordGetString
(
rec
,
3
);
destname
=
MSI_RecordGetString
(
rec
,
4
);
options
=
MSI_RecordGetInteger
(
rec
,
7
);
sourcedir
=
msi_dup_property
(
package
,
MSI_RecordGetString
(
rec
,
5
));
...
...
@@ -5617,11 +5617,20 @@ static UINT ITERATE_MoveFiles( MSIRECORD *rec, LPVOID param )
wildcards
=
strchrW
(
source
,
'*'
)
||
strchrW
(
source
,
'?'
);
if
(
!
destname
&&
!
wildcards
)
if
(
MSI_RecordIsNull
(
rec
,
4
)
)
{
destname
=
strdupW
(
sourcename
);
if
(
!
destname
)
goto
done
;
if
(
!
wildcards
)
{
destname
=
strdupW
(
sourcename
);
if
(
!
destname
)
goto
done
;
}
}
else
{
destname
=
strdupW
(
MSI_RecordGetString
(
rec
,
4
));
if
(
destname
)
reduce_to_longfilename
(
destname
);
}
size
=
0
;
...
...
@@ -5658,6 +5667,7 @@ static UINT ITERATE_MoveFiles( MSIRECORD *rec, LPVOID param )
done:
msi_free
(
sourcedir
);
msi_free
(
destdir
);
msi_free
(
destname
);
msi_free
(
source
);
msi_free
(
dest
);
...
...
dlls/msi/tests/install.c
View file @
ef1b0cac
...
...
@@ -575,6 +575,7 @@ static const CHAR mov_move_file_dat[] = "FileKey\tComponent_\tSourceName\tDestNa
"kazakhstan
\t
augustus
\t\t
kiribati
\t
FILEPATHGOOD
\t
MSITESTDIR
\t
1
\n
"
"laos
\t
augustus
\t
latvia
\t
lebanon
\t
SourceDir
\t
MSITESTDIR
\t
1
\n
"
"namibia
\t
augustus
\t
nauru
\t
kiribati
\t
SourceDir
\t
MSITESTDIR
\t
1
\n
"
"pakistan
\t
augustus
\t
peru
\t
sfn|poland
\t
SourceDir
\t
MSITESTDIR
\t
1
\n
"
"wildcard
\t
augustus
\t
app*
\t
wildcard
\t
SourceDir
\t
MSITESTDIR
\t
1
\n
"
"single
\t
augustus
\t
f?o
\t
single
\t
SourceDir
\t
MSITESTDIR
\t
1
\n
"
"wildcardnodest
\t
augustus
\t
budd*
\t\t
SourceDir
\t
MSITESTDIR
\t
1
\n
"
...
...
@@ -4390,6 +4391,7 @@ static void test_movefiles(void)
create_file
(
"kenya"
,
100
);
CreateDirectoryA
(
"latvia"
,
NULL
);
create_file
(
"nauru"
,
100
);
create_file
(
"peru"
,
100
);
create_file
(
"apple"
,
100
);
create_file
(
"application"
,
100
);
create_file
(
"ape"
,
100
);
...
...
@@ -4430,6 +4432,7 @@ static void test_movefiles(void)
ok
(
delete_pf
(
"msitest
\\
kiribati"
,
TRUE
),
"File not moved
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
lebanon"
,
TRUE
),
"File moved
\n
"
);
ok
(
!
delete_pf
(
"msitest
\\
lebanon"
,
FALSE
),
"Directory moved
\n
"
);
ok
(
delete_pf
(
"msitest
\\
poland"
,
TRUE
),
"File not moved
\n
"
);
/* either apple or application will be moved depending on directory order */
if
(
!
delete_pf
(
"msitest
\\
apple"
,
TRUE
))
ok
(
delete_pf
(
"msitest
\\
application"
,
TRUE
),
"File not moved
\n
"
);
...
...
@@ -4462,6 +4465,7 @@ static void test_movefiles(void)
ok
(
!
DeleteFileA
(
"kenya"
),
"File not moved
\n
"
);
ok
(
RemoveDirectoryA
(
"latvia"
),
"Directory moved
\n
"
);
ok
(
!
DeleteFileA
(
"nauru"
),
"File not moved
\n
"
);
ok
(
!
DeleteFileA
(
"peru"
),
"File not moved
\n
"
);
ok
(
!
DeleteFileA
(
"apple"
),
"File not moved
\n
"
);
ok
(
!
DeleteFileA
(
"application"
),
"File not moved
\n
"
);
ok
(
DeleteFileA
(
"ape"
),
"File moved
\n
"
);
...
...
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