Skip to content

Commit

Permalink
Make sure the file is an actual file.
Browse files Browse the repository at this point in the history
  • Loading branch information
dsmith committed Jun 29, 2010
1 parent 714adcd commit d95e211
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/com/simplegeo/android/cache/CacheHandler.java
Expand Up @@ -285,12 +285,14 @@ public void deleteAll() {

private void recursiveDelete(File file) {
File[] files = file.listFiles();
for(File subdir : files) {
if(subdir.isDirectory())
recursiveDelete(subdir);
else
subdir.delete();
}
if(files != null) {
for(File subdir : files) {
if(subdir.isDirectory())
recursiveDelete(subdir);
else
subdir.delete();
}
}
}

/**
Expand Down

0 comments on commit d95e211

Please sign in to comment.