diff options
Diffstat (limited to 'client/DownloadClient.cpp')
-rw-r--r-- | client/DownloadClient.cpp | 6 |
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); |