summaryrefslogtreecommitdiff
path: root/src/downloadmanager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/downloadmanager.cpp')
-rw-r--r--src/downloadmanager.cpp28
1 files changed, 11 insertions, 17 deletions
diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp
index 1f58d99f..3980cc05 100644
--- a/src/downloadmanager.cpp
+++ b/src/downloadmanager.cpp
@@ -145,28 +145,22 @@ bool DownloadManager::downloadResource(const KUrl &srcUrl, const KIO::MetaData &
{
KUrl destUrl;
- int result = KIO::R_OVERWRITE;
const QString fileName((suggestedName.isEmpty() ? srcUrl.fileName() : suggestedName));
- do
+ if (ReKonfig::askDownloadPath())
{
- if (ReKonfig::askDownloadPath())
- {
- // follow bug:184202 fixes
- destUrl = KFileDialog::getSaveFileName(KUrl::fromPath(fileName), QString(), parent);
- }
- else
- {
- destUrl = KUrl(ReKonfig::downloadPath().path() + QL1C('/') + fileName);
- }
-
- kDebug() << "DEST URL: " << destUrl;
+ // follow bug:184202 fixes
+ destUrl = KFileDialog::getSaveFileName(KUrl::fromPath(fileName), QString(), parent);
+ }
+ else
+ {
+ destUrl = KUrl(ReKonfig::downloadPath().path() + QL1C('/') + fileName);
+ }
- if (destUrl.isEmpty())
- return false;
+ kDebug() << "DEST URL: " << destUrl;
- }
- while (result == KIO::R_CANCEL && destUrl.isValid());
+ if (!destUrl.isValid())
+ return false;
// Save download history
DownloadItem *item = addDownload(srcUrl.pathOrUrl(), destUrl.pathOrUrl());