]> git.sur5r.net Git - minitube/commitdiff
Fallback to home dir
authorFlavio <flavio@odisseo.local>
Thu, 12 May 2011 10:06:19 +0000 (12:06 +0200)
committerFlavio <flavio@odisseo.local>
Thu, 12 May 2011 10:06:19 +0000 (12:06 +0200)
src/downloadmanager.cpp

index 6e3068b74911f670d3b1392d46e832dc4dc0a99a..d71185ba3c50df9f8565aa736e27e3eea3e4d0fa 100644 (file)
@@ -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;
 }