From c1cc65596187f909b924573fff12743456b1ff19 Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Fri, 10 Nov 2017 22:54:12 +0100 Subject: AssocMgr: - Installation of files removed --- plugins/AssocMgr/src/main.cpp | 37 +------------------------------------ 1 file changed, 1 insertion(+), 36 deletions(-) (limited to 'plugins/AssocMgr/src') diff --git a/plugins/AssocMgr/src/main.cpp b/plugins/AssocMgr/src/main.cpp index 10bd63eaf9..8f2fe1551b 100644 --- a/plugins/AssocMgr/src/main.cpp +++ b/plugins/AssocMgr/src/main.cpp @@ -66,37 +66,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD, LPVOID) return TRUE; } -static void InstallFile(const wchar_t *pszFileName,const wchar_t *pszDestSubDir) -{ - wchar_t szFileFrom[MAX_PATH+1],szFileTo[MAX_PATH+1]; - if (!GetModuleFileName(hInst, szFileFrom, _countof(szFileFrom) - (int)mir_wstrlen(pszFileName))) - return; - - wchar_t *p = wcsrchr(szFileFrom,'\\'); - if (p != NULL) - *(++p) = 0; - mir_wstrcat(szFileFrom,pszFileName); /* buffer safe */ - - HANDLE hFile = CreateFile(szFileFrom,0,FILE_SHARE_READ,0,OPEN_EXISTING,0,0); - if (hFile == INVALID_HANDLE_VALUE) - return; - CloseHandle(hFile); - - if (!GetModuleFileName(NULL, szFileTo, _countof(szFileTo)-(int)mir_wstrlen(pszDestSubDir)-(int)mir_wstrlen(pszFileName))) - return; - p = wcsrchr(szFileTo,'\\'); - if (p) - *(++p)=0; - mir_wstrcat(szFileTo,pszDestSubDir); /* buffer safe */ - CreateDirectory(szFileTo,NULL); - mir_wstrcat(szFileTo,pszFileName); /* buffer safe */ - - if ( !MoveFile(szFileFrom,szFileTo) && GetLastError() == ERROR_ALREADY_EXISTS) { - DeleteFile(szFileTo); - MoveFile(szFileFrom,szFileTo); - } -} - static int AssocMgrModulesLoaded(WPARAM,LPARAM) { InitTest(); @@ -115,10 +84,6 @@ extern "C" __declspec(dllexport) int Load(void) InitAssocList(); InitDde(); - /* installation */ - InstallFile(L"AssocMgr-Readme.txt",L"Docs\\"); - InstallFile(L"AssocMgr-License.txt",L"Docs\\"); - InstallFile(L"AssocMgr-SDK.zip",L"Docs\\"); hHookModulesLoaded=HookEvent(ME_SYSTEM_MODULESLOADED,AssocMgrModulesLoaded); return 0; } @@ -130,4 +95,4 @@ extern "C" __declspec(dllexport) int Unload(void) UninitAssocList(); UnhookEvent(hHookModulesLoaded); return 0; -} \ No newline at end of file +} -- cgit v1.2.3