Icons were not downloaded on first repo update if cache dir didn't exist

This commit is contained in:
Daniel Martí 2013-08-06 15:36:13 +02:00
parent 9886f59d17
commit 6efb3e4927

View File

@ -257,12 +257,12 @@ public class UpdateService extends IntentService implements ProgressListener {
if (success) { if (success) {
File d = DB.getIconsPath(this); File d = DB.getIconsPath(this);
List<DB.App> toDownloadIcons = null; List<DB.App> toDownloadIcons = null;
if (changes) { if (!d.exists()) {
toDownloadIcons = acceptedapps;
} else if (!d.exists()) {
Log.d("FDroid", "Icons were wiped. Re-downloading all of them."); Log.d("FDroid", "Icons were wiped. Re-downloading all of them.");
d.mkdirs(); d.mkdirs();
toDownloadIcons = ((FDroidApp) getApplication()).getApps(); toDownloadIcons = ((FDroidApp) getApplication()).getApps();
} else if (changes) {
toDownloadIcons = acceptedapps;
} }
if (toDownloadIcons != null) { if (toDownloadIcons != null) {
sendStatus(STATUS_INFO, sendStatus(STATUS_INFO,