summaryrefslogtreecommitdiff
path: root/plugins/Dropbox/src/dropbox_services.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2016-02-25 15:49:58 +0000
committerAlexander Lantsev <aunsane@gmail.com>2016-02-25 15:49:58 +0000
commit048e1f421b84529aa2b29da09027ce997573afd7 (patch)
tree230bde579a4622d6def27b4961639d3377f9cca3 /plugins/Dropbox/src/dropbox_services.cpp
parent8bf03133314064ec052873b01647c79b69a5b681 (diff)
Dropbox: reworked files sending
git-svn-id: http://svn.miranda-ng.org/main/trunk@16337 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Dropbox/src/dropbox_services.cpp')
-rw-r--r--plugins/Dropbox/src/dropbox_services.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/plugins/Dropbox/src/dropbox_services.cpp b/plugins/Dropbox/src/dropbox_services.cpp
index cece2a4bc3..81f77683ba 100644
--- a/plugins/Dropbox/src/dropbox_services.cpp
+++ b/plugins/Dropbox/src/dropbox_services.cpp
@@ -96,12 +96,11 @@ INT_PTR CDropbox::ProtoSendFile(WPARAM, LPARAM lParam)
ftp->pfts.ptszFiles[k] = mir_wstrdup(paths[i]);
- FILE *file = _wfopen(paths[i], L"rb");
- if (file != NULL) {
- fseek(file, 0, SEEK_END);
- ftp->pfts.totalBytes += ftell(file);
- fseek(file, 0, SEEK_SET);
- fclose(file);
+ FILE *hFile = _wfopen(paths[i], L"rb");
+ if (hFile != NULL) {
+ _fseeki64(hFile, 0, SEEK_END);
+ ftp->pfts.totalBytes += _ftelli64(hFile);
+ fclose(hFile);
}
k++;
}