From c2631ee0f7f4534499905154a9f42956adf630a8 Mon Sep 17 00:00:00 2001 From: macdonst Date: Tue, 8 May 2012 15:23:00 -0400 Subject: [PATCH] Properly querying the Andoid content DB when deleteing an image file --- framework/src/org/apache/cordova/FileUtils.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/framework/src/org/apache/cordova/FileUtils.java b/framework/src/org/apache/cordova/FileUtils.java index 863da5bd..c8a45cb4 100755 --- a/framework/src/org/apache/cordova/FileUtils.java +++ b/framework/src/org/apache/cordova/FileUtils.java @@ -220,9 +220,10 @@ public class FileUtils extends Plugin { * @param filePath the path to check */ private void notifyDelete(String filePath) { + String newFilePath = filePath.substring(7); int result = this.ctx.getContentResolver().delete(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, MediaStore.Images.Media.DATA + " = ?", - new String[] {filePath}); + new String[] {newFilePath}); } /**