summaryrefslogtreecommitdiff
path: root/plugins/AssocMgr
diff options
context:
space:
mode:
authorTobias Weimer <tweimer@users.noreply.github.com>2017-11-10 22:54:12 +0100
committerGitHub <noreply@github.com>2017-11-10 22:54:12 +0100
commitc1cc65596187f909b924573fff12743456b1ff19 (patch)
tree77fff20c2776ac88cadfa6324074afbc8208b183 /plugins/AssocMgr
parentc37011e0504633c4a5fb06d5016b4283e69dbe86 (diff)
AssocMgr:
- Installation of files removed
Diffstat (limited to 'plugins/AssocMgr')
-rw-r--r--plugins/AssocMgr/src/main.cpp37
1 files changed, 1 insertions, 36 deletions
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
+}