Re: msi: Enable cab compression and delete any resulting cabs using SHFileOperation
15 Dec
2006
15 Dec
'06
5 p.m.
"James Hawkins" <truiken(a)gmail.com> writes:
+static void delete_cab_files(void) +{ + SHFILEOPSTRUCT shfl; + CHAR path[MAX_PATH]; + + lstrcpyA(path, CURR_DIR); + lstrcatA(path, "\\*.cab\0"); + + shfl.hwnd = NULL; + shfl.wFunc = FO_DELETE; + shfl.pFrom = (LPCSTR)path; + shfl.pTo = NULL; + shfl.fFlags = FOF_FILESONLY | FOF_NOCONFIRMATION | FOF_NORECURSION | FOF_SILENT; + + SHFileOperation(&shfl); +}
If you are going to delete files with wildcards, you need to create a temp dir and do everything inside it, otherwise you risk deleting files that are not part of the test. -- Alexandre Julliard julliard(a)winehq.org
7027
Age (days ago)
7027
Last active (days ago)
0 comments
1 participants
participants (1)
-
Alexandre Julliard