summaryrefslogtreecommitdiff
path: root/utilities.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2011-03-21 00:12:19 +0200
committerGluzskiy Alexandr <sss123next@list.ru>2011-03-21 00:12:19 +0200
commit168e017640c0e16b513ee241213bec0758f42862 (patch)
tree8455258a966e187d5c4a3c2a3e5e6a80268007f8 /utilities.cpp
parent8b8fad30944818114c9f490f6118f80b2d30bc11 (diff)
modified: utilities.cpp
Diffstat (limited to 'utilities.cpp')
-rw-r--r--utilities.cpp24
1 files changed, 13 insertions, 11 deletions
diff --git a/utilities.cpp b/utilities.cpp
index cf909d2..e14cfc0 100644
--- a/utilities.cpp
+++ b/utilities.cpp
@@ -295,19 +295,21 @@ int onProtoAck(WPARAM w, LPARAM l)
case ACKRESULT_SUCCESS:
{
TCHAR *filename = NULL;
-// if(f->szCurrentFile && f->szCurrentFile[0])
-// filename = mir_utf8decodeW(f->szCurrentFile);
- if(f->tszCurrentFile && f->tszCurrentFile[0])
- filename = mir_wstrdup(f->tszCurrentFile);
- if(!filename)
- break;
- TCHAR *temp = _wgetenv(_T("TEMP"));
- if(_tcsstr(filename, temp))
+ if(f->flags & PFTS_UNICODE)
{
- mir_free(filename);
- break;
+ if(f->tszCurrentFile && f->tszCurrentFile[0])
+ filename = mir_wstrdup(f->tszCurrentFile);
+ if(!filename)
+ return 0;
+ }
+ else
+ {
+ if(f->szCurrentFile && f->szCurrentFile[0])
+ filename = mir_utf8decodeT(f->szCurrentFile);
+ if(!filename)
+ return 0;
}
- else if(_tcsstr(filename, _T(".gpg"))) //decrypt it
+ if(_tcsstr(filename, _T(".gpg"))) //decrypt it
{ //process encrypted file
if(_waccess(f->tszCurrentFile, 0) == -1)
{