From 9789d29cc1d101cd3f8790fad4c9089026e1c095 Mon Sep 17 00:00:00 2001 From: Flavio Date: Thu, 12 May 2011 12:06:19 +0200 Subject: [PATCH] Fallback to home dir --- src/downloadmanager.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp index 6e3068b..d71185b 100644 --- a/src/downloadmanager.cpp +++ b/src/downloadmanager.cpp @@ -145,11 +145,12 @@ QString DownloadManager::defaultDownloadFolder() { if (!moviesDir.exists()) { // fallback to Desktop path = QDesktopServices::storageLocation(QDesktopServices::DesktopLocation); - } - QDir desktopDir(path); - if (!desktopDir.exists()) { - // fallback to Home - path = QDesktopServices::storageLocation(QDesktopServices::HomeLocation); + + QDir desktopDir(path); + if (!desktopDir.exists()) { + // fallback to Home + path = QDesktopServices::storageLocation(QDesktopServices::HomeLocation); + } } return path; } -- 2.39.5