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.zip rockbox-189148e70128d037f7bd541f2c1f21aa783000d9.tar.gz rockbox-189148e70128d037f7bd541f2c1f21aa783000d9.tar.bz2 rockbox-189148e70128d037f7bd541f2c1f21aa783000d9.tar.xz | |
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 b85c2db..5ea5002 100644 --- a/rbutil/rbutilqt/rbutilqt.cpp +++ b/rbutil/rbutilqt/rbutilqt.cpp @@ -116,6 +116,9 @@ RbUtilQt::RbUtilQt(QWidget *parent) : QMainWindow(parent) /* eject funtionality is only implemented on W32 right now. */ ui.buttonEject->setEnabled(false); #endif + QString c = RbSettings::value(RbSettings::CachePath).toString(); + if(c.isEmpty()) c = QDir::tempPath(); + HttpGet::setGlobalCache(c); updateDevice(); downloadInfo(); |