diff options
Diffstat (limited to 'src/main.cpp')
| -rw-r--r-- | src/main.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/main.cpp b/src/main.cpp index 6f3d283..bd7abb7 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -84,17 +84,18 @@ int main(int argc, char *argv[]) else baseURL = DEFAULT_URL; + // Setting downloads target directory. if (clo.contains("downloadDir")){ - downloadDirectory = QDir(clo.value("downloadDir")); - if (debug) qDebug() << "downloadDir set to: " << clo.value("downloadDir"); + downloadPath = binPath + clo.value("downloadDir"); + if (debug) qDebug() << "clo set downloadDir to: " << binPath + clo.value("downloadDir"); } else if (confFileSettings.contains("default/downloadDirectory")){ - downloadDirectory = QDir(confFileSettings.value("default/downloadDirectory").toString()); - if (debug) qDebug() << "downloadDir set to: " << confFileSettings.value("default/downloadDirectory").toString(); + downloadPath = binPath + confFileSettings.value("default/downloadDirectory").toString(); + if (debug) qDebug() << "conf set downloadDir to: " << binPath + confFileSettings.value("default/downloadDirectory").toString(); } else - downloadDirectory = QDir("."); - if (debug) qDebug() << "Downloads will be saved to: " << downloadDirectory.dirName(); + downloadPath = binPath + "/downloads"; + if (debug) qDebug() << "Downloads will be saved to: " << downloadPath; // Start fbgui. fbgui gui(&app); gui.show(); |
