Module: wine Branch: master Commit: 448ede1adbdac67e9493ab6789d831ab02834184 URL: http://source.winehq.org/git/wine.git/?a=commit;h=448ede1adbdac67e9493ab6789...
Author: Alexandre Julliard julliard@winehq.org Date: Tue Feb 19 12:19:42 2008 +0100
wineboot: Delete files from dllcache once they have been installed.
---
programs/wineboot/wineboot.c | 11 ++++++++++- 1 files changed, 10 insertions(+), 1 deletions(-)
diff --git a/programs/wineboot/wineboot.c b/programs/wineboot/wineboot.c index 23735dc..3185963 100644 --- a/programs/wineboot/wineboot.c +++ b/programs/wineboot/wineboot.c @@ -522,9 +522,18 @@ static int ProcessWindowsFileProtection(void) dllcache, targetpath, currentpath, tempfile, &sz); if (rc != ERROR_SUCCESS) { - WINE_ERR("WFP: %s error 0x%x\n",wine_dbgstr_w(finddata.cFileName),rc); + WINE_WARN("WFP: %s error 0x%x\n",wine_dbgstr_w(finddata.cFileName),rc); DeleteFileW(tempfile); } + + /* now delete the source file so that we don't try to install it over and over again */ + lstrcpynW( targetpath, dllcache, MAX_PATH - 1 ); + sz = strlenW( targetpath ); + targetpath[sz++] = '\'; + lstrcpynW( targetpath + sz, finddata.cFileName, MAX_PATH - sz ); + if (!DeleteFileW( targetpath )) + WINE_WARN( "failed to delete %s: error %u\n", wine_dbgstr_w(targetpath), GetLastError() ); + find_rc = FindNextFileW(find_handle,&finddata); } FindClose(find_handle);