diff options
author | Alexander Gluzsky <sss123next@list.ru> | 2013-02-05 01:51:10 +0000 |
---|---|---|
committer | Alexander Gluzsky <sss123next@list.ru> | 2013-02-05 01:51:10 +0000 |
commit | bd8802ef0df758ca788bbed4851bb51478b28047 (patch) | |
tree | 3c354c62ffa937427c9e719e209c2714ac175421 /plugins/New_GPG/src/init.cpp | |
parent | 8770cf2fdfd72c89260edfa924452e8ca7237d93 (diff) |
fixed temporary files cleanup during runtime
added temporary files cleanup on start and exit
"boosted" code instead of winapi in some places
//TODO: "boosted" process management (it will provide more convenient way to control process and work with pipes, it also should be faster because currently loops with sleep interval used)
git-svn-id: http://svn.miranda-ng.org/main/trunk@3428 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/New_GPG/src/init.cpp')
-rwxr-xr-x | plugins/New_GPG/src/init.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/plugins/New_GPG/src/init.cpp b/plugins/New_GPG/src/init.cpp index 3b6c662032..de1f3144f9 100755 --- a/plugins/New_GPG/src/init.cpp +++ b/plugins/New_GPG/src/init.cpp @@ -178,6 +178,7 @@ static int OnModulesLoaded(WPARAM wParam,LPARAM lParam) CreateProtoServiceFunction(szGPGModuleName, PSS_FILE, (MIRANDASERVICE)onSendFile);
CreateProtoServiceFunction(szGPGModuleName, PSS_FILE"W", (MIRANDASERVICE)onSendFile);
+ clean_temp_dir();
return 0;
}
@@ -250,7 +251,7 @@ extern "C" int __declspec(dllexport) Unload(void) {
for(list<wstring>::iterator p = transfers.begin(); p != transfers.end(); p++)
if(!(*p).empty())
- DeleteFile((*p).c_str());
+ boost::filesystem::remove((*p));
}
mir_free(inopentag);
mir_free(inclosetag);
@@ -258,5 +259,6 @@ extern "C" int __declspec(dllexport) Unload(void) mir_free(outclosetag);
if(password)
mir_free(password);
+ clean_temp_dir();
return 0;
}
|