From 82adb670d46b27f32aad66e45672a0cc58e4e330 Mon Sep 17 00:00:00 2001 From: JuanJakobo <34421964+JuanJakobo@users.noreply.github.com> Date: Sun, 21 Feb 2021 20:31:29 +0100 Subject: [PATCH] adjusted info on folder download --- src/util/nextcloud.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/util/nextcloud.cpp b/src/util/nextcloud.cpp index 3edd323..ad37aac 100644 --- a/src/util/nextcloud.cpp +++ b/src/util/nextcloud.cpp @@ -144,7 +144,7 @@ void Nextcloud::downloadItem(vector &tempItems, int itemID) { if(tempItems.at(itemID).getState() == FileState::ISYNCED) { - Message(ICON_INFORMATION, "INFO", ("The newest version of file " + tempItems.at(itemID).getPath() + " is already downloaded.").c_str(), 2000); + UpdateProgressbar(("The newest version of file " + tempItems.at(itemID).getLocalPath() + " is already downloaded.").c_str(), 0); return; } @@ -154,7 +154,7 @@ void Nextcloud::downloadItem(vector &tempItems, int itemID) return; } - UpdateProgressbar(("Starting Download of " + tempItems.at(itemID).getPath()).c_str(), 0); + UpdateProgressbar(("Starting Download of " + tempItems.at(itemID).getLocalPath()).c_str(), 0); CURLcode res; CURL *curl = curl_easy_init(); @@ -164,7 +164,7 @@ void Nextcloud::downloadItem(vector &tempItems, int itemID) string post = this->getUsername() + std::string(":") + this->getPassword(); FILE *fp; - fp = iv_fopen(tempItems.at(itemID).getLocalPath().c_str(), "wb"); + fp = iv_fopen(tempItems.at(itemID).getTitle().c_str(), "wb"); curl_easy_setopt(curl, CURLOPT_URL, (_url + tempItems.at(itemID).getPath()).c_str()); curl_easy_setopt(curl, CURLOPT_USERPWD, post.c_str()); @@ -206,6 +206,7 @@ void Nextcloud::downloadItem(vector &tempItems, int itemID) bool Nextcloud::downloadFolder(vector &tempItems, int itemID) { + BanSleep(2000); if (tempItems.at(itemID).getType() == Itemtype::IFOLDER) { string temp = tempItems.at(itemID).getPath();