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
This commit is contained in:
Dominik Riebeling 2013-01-27 20:09:00 +01:00
parent e96df430c4
commit 189148e701

View file

@ -116,6 +116,9 @@ RbUtilQt::RbUtilQt(QWidget *parent) : QMainWindow(parent)
/* eject funtionality is only implemented on W32 right now. */ /* eject funtionality is only implemented on W32 right now. */
ui.buttonEject->setEnabled(false); ui.buttonEject->setEnabled(false);
#endif #endif
QString c = RbSettings::value(RbSettings::CachePath).toString();
if(c.isEmpty()) c = QDir::tempPath();
HttpGet::setGlobalCache(c);
updateDevice(); updateDevice();
downloadInfo(); downloadInfo();