fixed Cache viewer when cache directory does not exist (browser not installed)

This commit is contained in:
Jindra Petk
2013-09-11 19:51:27 +02:00
parent cf003bc0b1
commit 1357bc9fe6
3 changed files with 16 additions and 4 deletions

View File

@@ -34,6 +34,9 @@ public class FirefoxCache implements CacheImplementation {
@Override
public void refresh() {
File dir = getCacheDirectory();
if(dir==null){
return;
}
File cacheMapFile = new File(dir, "_CACHE_MAP_");
try {
map = new CacheMap(cacheMapFile);
@@ -105,6 +108,9 @@ public class FirefoxCache implements CacheImplementation {
if (profileDir != null) {
cacheDir = new File(profileDir, "Cache");
}
if(!cacheDir.exists()){
return null;
}
return cacheDir;
}