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
181beef8
Commit
181beef8
authored
Feb 02, 2011
by
Hans Leidekker
Committed by
Alexandre Julliard
Feb 02, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msi: Try harder to remove non-persistent directories.
parent
9d7277df
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
12 deletions
+34
-12
files.c
dlls/msi/files.c
+34
-12
No files found.
dlls/msi/files.c
View file @
181beef8
...
@@ -986,6 +986,33 @@ done:
...
@@ -986,6 +986,33 @@ done:
return
ret
;
return
ret
;
}
}
static
BOOL
has_persistent_dir
(
MSIPACKAGE
*
package
,
MSICOMPONENT
*
comp
)
{
MSIQUERY
*
view
;
UINT
r
=
ERROR_FUNCTION_FAILED
;
static
const
WCHAR
query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'C'
,
'r'
,
'e'
,
'a'
,
't'
,
'e'
,
'F'
,
'o'
,
'l'
,
'd'
,
'e'
,
'r'
,
'`'
,
' '
,
'W'
,
'H'
,
'E'
,
'R'
,
'E'
,
' '
,
'`'
,
'C'
,
'o'
,
'm'
,
'p'
,
'o'
,
'n'
,
'e'
,
'n'
,
't'
,
'_'
,
'`'
,
' '
,
'='
,
'\''
,
'%'
,
's'
,
'\''
,
' '
,
'A'
,
'N'
,
'D'
,
' '
,
'`'
,
'D'
,
'i'
,
'r'
,
'e'
,
'c'
,
't'
,
'o'
,
'r'
,
'y'
,
'_'
,
'`'
,
' '
,
'='
,
'\''
,
'%'
,
's'
,
'\''
,
0
};
if
(
!
MSI_OpenQuery
(
package
->
db
,
&
view
,
query
,
comp
->
Component
,
comp
->
Directory
))
{
if
(
!
MSI_ViewExecute
(
view
,
NULL
))
{
MSIRECORD
*
rec
;
if
(
!
(
r
=
MSI_ViewFetch
(
view
,
&
rec
)))
{
TRACE
(
"directory %s is persistent
\n
"
,
debugstr_w
(
comp
->
Directory
));
msiobj_release
(
&
rec
->
hdr
);
}
}
msiobj_release
(
&
view
->
hdr
);
}
return
(
r
==
ERROR_SUCCESS
);
}
UINT
ACTION_RemoveFiles
(
MSIPACKAGE
*
package
)
UINT
ACTION_RemoveFiles
(
MSIPACKAGE
*
package
)
{
{
MSIQUERY
*
view
;
MSIQUERY
*
view
;
...
@@ -995,9 +1022,6 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package )
...
@@ -995,9 +1022,6 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package )
static
const
WCHAR
query
[]
=
{
static
const
WCHAR
query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'R'
,
'e'
,
'm'
,
'o'
,
'v'
,
'e'
,
'F'
,
'i'
,
'l'
,
'e'
,
'`'
,
0
};
'`'
,
'R'
,
'e'
,
'm'
,
'o'
,
'v'
,
'e'
,
'F'
,
'i'
,
'l'
,
'e'
,
'`'
,
0
};
static
const
WCHAR
folder_query
[]
=
{
'S'
,
'E'
,
'L'
,
'E'
,
'C'
,
'T'
,
' '
,
'*'
,
' '
,
'F'
,
'R'
,
'O'
,
'M'
,
' '
,
'`'
,
'C'
,
'r'
,
'e'
,
'a'
,
't'
,
'e'
,
'F'
,
'o'
,
'l'
,
'd'
,
'e'
,
'r'
,
'`'
,
0
};
r
=
MSI_DatabaseOpenViewW
(
package
->
db
,
query
,
&
view
);
r
=
MSI_DatabaseOpenViewW
(
package
->
db
,
query
,
&
view
);
if
(
r
==
ERROR_SUCCESS
)
if
(
r
==
ERROR_SUCCESS
)
...
@@ -1006,10 +1030,6 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package )
...
@@ -1006,10 +1030,6 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package )
msiobj_release
(
&
view
->
hdr
);
msiobj_release
(
&
view
->
hdr
);
}
}
r
=
MSI_DatabaseOpenViewW
(
package
->
db
,
folder_query
,
&
view
);
if
(
r
==
ERROR_SUCCESS
)
msiobj_release
(
&
view
->
hdr
);
LIST_FOR_EACH_ENTRY
(
file
,
&
package
->
files
,
MSIFILE
,
entry
)
LIST_FOR_EACH_ENTRY
(
file
,
&
package
->
files
,
MSIFILE
,
entry
)
{
{
MSIRECORD
*
uirow
;
MSIRECORD
*
uirow
;
...
@@ -1054,12 +1074,14 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package )
...
@@ -1054,12 +1074,14 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package )
{
{
WARN
(
"failed to delete %s (%u)
\n
"
,
debugstr_w
(
file
->
TargetPath
),
GetLastError
());
WARN
(
"failed to delete %s (%u)
\n
"
,
debugstr_w
(
file
->
TargetPath
),
GetLastError
());
}
}
/* FIXME: check persistence for each directory */
else
if
(
!
has_persistent_dir
(
package
,
file
->
Component
))
else
if
(
r
&&
(
dir
=
strdupW
(
file
->
TargetPath
)))
{
{
if
((
p
=
strrchrW
(
dir
,
'\\'
)))
*
p
=
0
;
if
((
dir
=
strdupW
(
file
->
TargetPath
)))
RemoveDirectoryW
(
dir
);
{
msi_free
(
dir
);
if
((
p
=
strrchrW
(
dir
,
'\\'
)))
*
p
=
0
;
RemoveDirectoryW
(
dir
);
msi_free
(
dir
);
}
}
}
file
->
state
=
msifs_missing
;
file
->
state
=
msifs_missing
;
...
...
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