From: Flavio Date: Thu, 12 May 2011 10:06:19 +0000 (+0200) Subject: Fallback to home dir X-Git-Tag: 1.4.3~6 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=9789d29cc1d101cd3f8790fad4c9089026e1c095;p=minitube Fallback to home dir --- 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; }