diff options
author | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2013-01-27 20:09:00 +0100 |
---|---|---|
committer | Dominik Riebeling <Dominik.Riebeling@gmail.com> | 2013-01-27 20:11:18 +0100 |
commit | 189148e70128d037f7bd541f2c1f21aa783000d9 (patch) | |
tree | 1010e8d8a23e1a000b2210865b37c45570e148e2 | |
parent | e96df430c4def5c2a17a54d28b42857a48bd83fa (diff) | |
download | rockbox-189148e70128d037f7bd541f2c1f21aa783000d9.tar.gz rockbox-189148e70128d037f7bd541f2c1f21aa783000d9.zip |
Set global cache immediately on startup.
Setting the cache later can result in the system trying to create cache files
in the current working directory, since an empty cache path will be treated as
current directory. If this happens set the system temporary path.
Change-Id: I1623330013d387a966015edd0e1d278c922d9475
-rw-r--r-- | rbutil/rbutilqt/rbutilqt.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/rbutil/rbutilqt/rbutilqt.cpp b/rbutil/rbutilqt/rbutilqt.cpp index b85c2db411..5ea5002c8f 100644 --- a/rbutil/rbutilqt/rbutilqt.cpp +++ b/rbutil/rbutilqt/rbutilqt.cpp | |||
@@ -116,6 +116,9 @@ RbUtilQt::RbUtilQt(QWidget *parent) : QMainWindow(parent) | |||
116 | /* eject funtionality is only implemented on W32 right now. */ | 116 | /* eject funtionality is only implemented on W32 right now. */ |
117 | ui.buttonEject->setEnabled(false); | 117 | ui.buttonEject->setEnabled(false); |
118 | #endif | 118 | #endif |
119 | QString c = RbSettings::value(RbSettings::CachePath).toString(); | ||
120 | if(c.isEmpty()) c = QDir::tempPath(); | ||
121 | HttpGet::setGlobalCache(c); | ||
119 | updateDevice(); | 122 | updateDevice(); |
120 | downloadInfo(); | 123 | downloadInfo(); |
121 | 124 | ||