summaryrefslogtreecommitdiff
path: root/plugins/SeenPlugin/src/file.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/SeenPlugin/src/file.cpp')
-rw-r--r--plugins/SeenPlugin/src/file.cpp7
1 files changed, 6 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;