summaryrefslogtreecommitdiff
path: root/protocols/AimOscar/src/file.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-05-22 16:04:17 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-05-22 16:04:17 +0000
commite2c2a1f5a84c6c9b705dc85c6a2dd1f97edd57e4 (patch)
treeba79bdcede96f80039f8b88d2791f198b9ec2981 /protocols/AimOscar/src/file.cpp
parentf8e34b5f83f3ce5f39d541e9068b6b8cb6d92acd (diff)
T2Utf - handy replacement for ptrA<mir_utf8decodeT()>
git-svn-id: http://svn.miranda-ng.org/main/trunk@13758 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/AimOscar/src/file.cpp')
-rw-r--r--protocols/AimOscar/src/file.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/protocols/AimOscar/src/file.cpp b/protocols/AimOscar/src/file.cpp
index b8eb1840f0..d47aa56b02 100644
--- a/protocols/AimOscar/src/file.cpp
+++ b/protocols/AimOscar/src/file.cpp
@@ -120,24 +120,22 @@ bool setup_next_file_send(file_transfer *ft)
ft->pfts.currentFileProgress = 0;
char* fnamea;
- char* fname = mir_utf8encodeT(file);
+ T2Utf fname(file);
if (ft->pfts.totalFiles > 1 && ft->file[0])
{
size_t dlen = mir_strlen(ft->file);
if (strncmp(fname, ft->file, dlen) == 0 && fname[dlen] == '\\')
{
fnamea = &fname[dlen+1];
- for (char *p = fnamea; *p; ++p) { if (*p == '\\') *p = 1; }
+ for (char *p = fnamea; *p; ++p)
+ if (*p == '\\')
+ *p = 1;
}
- else
- fnamea = get_fname(fname);
+ else fnamea = get_fname(fname);
}
- else
- fnamea = get_fname(fname);
+ else fnamea = get_fname(fname);
send_init_oft2(ft, fnamea);
-
- mir_free(fname);
return true;
}