summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/SeenPlugin/src/file.cpp7
-rw-r--r--plugins/SeenPlugin/src/utils.cpp1
2 files changed, 7 insertions, 1 deletions
diff --git a/plugins/SeenPlugin/src/file.cpp b/plugins/SeenPlugin/src/file.cpp
index b6e004897c..357ae08b7b 100644
--- a/plugins/SeenPlugin/src/file.cpp
+++ b/plugins/SeenPlugin/src/file.cpp
@@ -70,7 +70,12 @@ void FileWrite(HANDLE hcontact)
HANDLE fhout = CreateFile(szout, GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, 0, NULL);
if (fhout == INVALID_HANDLE_VALUE){
- CreateDirectoryTreeT(szout);
+ TCHAR fullpath[1024];
+ _tcscpy(fullpath, szout);
+ TCHAR *dirpath = _tcsrchr(fullpath, '\\');
+ if (dirpath != NULL)
+ *dirpath = '\0';
+ CreateDirectoryTreeT(fullpath);
fhout = CreateFile(szout, GENERIC_WRITE, 0, NULL, OPEN_ALWAYS, 0, NULL);
if (fhout == INVALID_HANDLE_VALUE)
return;
diff --git a/plugins/SeenPlugin/src/utils.cpp b/plugins/SeenPlugin/src/utils.cpp
index c307fe1411..bbbcc66779 100644
--- a/plugins/SeenPlugin/src/utils.cpp
+++ b/plugins/SeenPlugin/src/utils.cpp
@@ -371,6 +371,7 @@ LBL_charPtr:
case 'P':
_tcscpy(szdbsetting, ci.szProto ? _A2T(ci.szProto) : (wantempty ? _T("") : _T("ProtoUnknown")));
+ charPtr = szdbsetting;
goto LBL_charPtr;
case 'b':