summaryrefslogtreecommitdiff
path: root/src/modules/database/dbintf.cpp
diff options
context:
space:
mode:
authorKirill Volinsky <mataes2007@gmail.com>2013-09-05 11:20:44 +0000
committerKirill Volinsky <mataes2007@gmail.com>2013-09-05 11:20:44 +0000
commite87ec53dc12840763c488046aaaaeea8676bd129 (patch)
tree2d2ed0aece1f58705e1f035d475ad86dc7bdcd1f /src/modules/database/dbintf.cpp
parent2be2d3adf3a3870d2f8d7e4908c103bcf61b9032 (diff)
remove avatar when contact removing
git-svn-id: http://svn.miranda-ng.org/main/trunk@5953 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/database/dbintf.cpp')
-rw-r--r--src/modules/database/dbintf.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/modules/database/dbintf.cpp b/src/modules/database/dbintf.cpp
index 4c37e0884a..aaf77aa895 100644
--- a/src/modules/database/dbintf.cpp
+++ b/src/modules/database/dbintf.cpp
@@ -47,6 +47,11 @@ static INT_PTR srvGetContactCount(WPARAM, LPARAM)
static INT_PTR srvDeleteContact(WPARAM wParam, LPARAM)
{
+ DBVARIANT dbv = {0};
+ if ( !db_get_ts((HANDLE)wParam, "ContactPhoto", "File", &dbv)) {
+ DeleteFile(dbv.ptszVal);
+ db_free(&dbv);
+ }
return (currDb) ? currDb->DeleteContact((HANDLE)wParam) : 0;
}