Delete cached box art when deleting a PC

This commit is contained in:
Cameron Gutman committed 2019-07-28 11:38:35 -07:00
1 parent 8665fe364f
commit 352b6f7dd9
2 files changed
+13

No files matched your search

@@ -137,6 +137,16 @@ public class DiskAssetLoader {
return CacheHelper.openPath(false, cacheDir, "boxart", computerUuid, appId + ".png");
}
public void deleteAssetsForComputer(String computerUuid) {
File dir = CacheHelper.openPath(false, cacheDir, "boxart", computerUuid);
File[] files = dir.listFiles();
if (files != null) {
for (File f : files) {
f.delete();
}
}
}
public void populateCacheWithStream(CachedAppAssetLoader.LoaderTuple tuple, InputStream input) {
OutputStream out = null;
boolean success = false;