summaryrefslogtreecommitdiff
path: root/client/DownloadClient.cpp
diff options
context:
space:
mode:
authorAlex Borisov <b0ric.alex@gmail.com>2012-03-18 09:51:39 +0200
committerAlex Borisov <b0ric.alex@gmail.com>2012-03-18 09:51:39 +0200
commitd52c505daaef53cd1c039c1d2b993b7d389c9d94 (patch)
tree1a9fb70388d3c34d8e12cf0f7b2bf8cdce90fdf8 /client/DownloadClient.cpp
parent036dd14e811bd84dea65264a91f11a489538f1b1 (diff)
FIX: infinite uploading issue, download speed issue
Diffstat (limited to 'client/DownloadClient.cpp')
-rw-r--r--client/DownloadClient.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/client/DownloadClient.cpp b/client/DownloadClient.cpp
index 723dbcb..110601a 100644
--- a/client/DownloadClient.cpp
+++ b/client/DownloadClient.cpp
@@ -57,7 +57,11 @@ void DownloadClient::DoDownload()
QString filename = QString::fromLocal8Bit(file.first.c_str());
string md5 = file.second;
current = new QFile(filename);
- current->open(QIODevice::WriteOnly | QIODevice::Unbuffered);
+ if (! current->open(QIODevice::WriteOnly | QIODevice::Unbuffered))
+ {
+ Logger::Info("Can't open file: path isn't available\n");
+ DoDownload();
+ }
Logger::Info("Downloading file (%d of %u): %s\n", currentId + 1, files.size(), file.first.c_str());
SendFileRequest(file.first);