Add check for empty lines in DownloadManager

This commit is contained in:
Alexander Bock
2017-02-06 19:14:42 -05:00
parent 94e3e11188
commit 41fda78792
+6
View File
@@ -299,6 +299,12 @@ std::vector<std::shared_ptr<DownloadManager::FileFuture>> DownloadManager::downl
std::string line;
int nFiles = 0;
while (std::getline(temporary, line)) {
if (line.empty()) {
// This might occur if someone added multiple newlines
// or mixing carriage return and newlines
continue;
}
++nFiles;
#ifdef __APPLE__
// @TODO: Fix this so that the ifdef is not necessary anymore ---abock