summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/com/android/browser/provider/SnapshotProvider.java7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/com/android/browser/provider/SnapshotProvider.java b/src/com/android/browser/provider/SnapshotProvider.java
index b8b6bcf..e005c36 100644
--- a/src/com/android/browser/provider/SnapshotProvider.java
+++ b/src/com/android/browser/provider/SnapshotProvider.java
@@ -28,6 +28,7 @@ import android.database.sqlite.SQLiteQueryBuilder;
import android.net.Uri;
import android.os.FileUtils;
import android.provider.BrowserContract;
+import android.text.TextUtils;
import java.io.File;
@@ -216,7 +217,11 @@ public class SnapshotProvider extends ContentProvider {
selectionArgs, null, null, null);
final Context context = getContext();
while (c.moveToNext()) {
- File f = context.getFileStreamPath(c.getString(0));
+ String filename = c.getString(0);
+ if (TextUtils.isEmpty(filename)) {
+ continue;
+ }
+ File f = context.getFileStreamPath(filename);
if (f.exists()) {
if (!f.delete()) {
f.deleteOnExit();