Properly querying the Andoid content DB when deleteing an image file

Project: http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/repo
Commit: 
http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/commit/c2631ee0
Tree: 
http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/tree/c2631ee0
Diff: 
http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/diff/c2631ee0

Branch: refs/heads/CordovaWebView
Commit: c2631ee0f7f4534499905154a9f42956adf630a8
Parents: bafa438
Author: macdonst <simon.macdon...@gmail.com>
Authored: Tue May 8 15:23:00 2012 -0400
Committer: macdonst <simon.macdon...@gmail.com>
Committed: Tue May 8 15:23:00 2012 -0400

----------------------------------------------------------------------
 framework/src/org/apache/cordova/FileUtils.java |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-cordova-android/blob/c2631ee0/framework/src/org/apache/cordova/FileUtils.java
----------------------------------------------------------------------
diff --git a/framework/src/org/apache/cordova/FileUtils.java 
b/framework/src/org/apache/cordova/FileUtils.java
index 863da5b..c8a45cb 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});
     }
 
     /**

Reply via email to