summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Riebeling <Dominik.Riebeling@gmail.com>2020-12-16 11:56:00 +0100
committerDominik Riebeling <Dominik.Riebeling@gmail.com>2021-01-02 21:31:20 +0100
commit022bbad76281ee0f1cf72d6912eaa32c34273ef9 (patch)
tree37fb886a7aaf479cc221d125de5b911d8e35f7a2
parentec01c570229bfe79fa9471fc226fc3c9bb11878e (diff)
downloadrockbox-022bbad76281ee0f1cf72d6912eaa32c34273ef9.tar.gz
rockbox-022bbad76281ee0f1cf72d6912eaa32c34273ef9.tar.bz2
rockbox-022bbad76281ee0f1cf72d6912eaa32c34273ef9.zip
rbutil: Fix cleaning cache.
As with calculating the size cleaning the cache folder needs to be recursive. Change-Id: I05a8e2287bcdf6ed53acde320cb5071e8ed04b91
-rw-r--r--rbutil/rbutilqt/configure.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/rbutil/rbutilqt/configure.cpp b/rbutil/rbutilqt/configure.cpp
index 507d0bec41..14080a552c 100644
--- a/rbutil/rbutilqt/configure.cpp
+++ b/rbutil/rbutilqt/configure.cpp
@@ -875,13 +875,7 @@ void Config::cacheClear()
return;
}
QDir dir(cache);
- QStringList fn;
- fn = dir.entryList(QStringList("*"), QDir::Files, QDir::Name);
-
- for(int i = 0; i < fn.size(); i++) {
- QString f = cache + fn.at(i);
- QFile::remove(f);
- }
+ dir.removeRecursively();
updateCacheInfo(RbSettings::value(RbSettings::CachePath).toString());
}