summaryrefslogtreecommitdiff
path: root/utilities.cpp
diff options
context:
space:
mode:
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)
{