apache / apache/cordova-plugin-file
Error when deleting multiple files
- Dominant language
- JavaScript
- Stars
- 744
- Forks
- 754
- Avg merge
- 3d 4h
- Merged PRs (30d)
- 1
Description
# Bug Report
## Problem
### What is expected to happen?
Delete all files selected based on path/name.
### What does actually happen?
Error(5) encoding_error
## Information
It only deletes the first file and stop working, i cant delete any file after this error is show.
### Command or Code
var promises = [];
this.items.map(i => {
var t = i.path.split('/');
var name = t.pop();
var path = t.join('/');
promises.push(this.fileService.deleteFile(path, name));
});
Promise.all(promises).then(result => {
this.select = false;
this.updateBuilding();
}).catch(err => {
console.log(err);
})
### Environment, Platform, Device
Android
## Checklist
- [x] I searched for existing GitHub issues
- [x] I updated all Cordova tooling to most recent version
- [x] I included all the necessary information above
Contributor guide
Research direction
Start by reproducing the Android failure with the provided Promise.all call and inspect the fileService.deleteFile entry point. Confirm that deleting multiple selected paths removes every file without Error(5) encoding_error and that later deletions still work.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, javascript
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100