mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-07 23:03:11 +08:00
Properly querying the Andoid content DB when deleteing an image file
This commit is contained in:
parent
bafa438ce3
commit
c2631ee0f7
@ -220,9 +220,10 @@ public class FileUtils extends Plugin {
|
|||||||
* @param filePath the path to check
|
* @param filePath the path to check
|
||||||
*/
|
*/
|
||||||
private void notifyDelete(String filePath) {
|
private void notifyDelete(String filePath) {
|
||||||
|
String newFilePath = filePath.substring(7);
|
||||||
int result = this.ctx.getContentResolver().delete(MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
|
int result = this.ctx.getContentResolver().delete(MediaStore.Images.Media.EXTERNAL_CONTENT_URI,
|
||||||
MediaStore.Images.Media.DATA + " = ?",
|
MediaStore.Images.Media.DATA + " = ?",
|
||||||
new String[] {filePath});
|
new String[] {newFilePath});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user