You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by bo...@apache.org on 2012/05/11 19:36:41 UTC

[6/13] android commit: Properly querying the Andoid content DB when deleteing an image file

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 <si...@gmail.com>
Authored: Tue May 8 15:23:00 2012 -0400
Committer: macdonst <si...@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});
     }
 
     /**