diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2012-12-22 19:04:07 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2012-12-22 19:04:07 +0000 |
commit | 221a7540da4a15638002eb9d7f8876e3489a6e13 (patch) | |
tree | 898038b0495081c70cdd510852234e39c896dae1 /plugins | |
parent | fee81607c448feaa85024f056c54c6a020d10884 (diff) |
try to fix crash on parsing data and creating log files
git-svn-id: http://svn.miranda-ng.org/main/trunk@2806 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/SeenPlugin/src/file.cpp | 7 | ||||
-rw-r--r-- | plugins/SeenPlugin/src/utils.cpp | 1 |
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':
|