apache / apache/cordova-plugin-file

@ symbol in directory name causes it to become a FileEntry

Open
#290 3 comments 0 reactions 0 assignees View on GitHub
platform: android support
Dominant language
JavaScript
Stars
744
Forks
754
Avg merge
3d 4h
Merged PRs (30d)
1

Description

When running the below code

```
listDir(path){
window.resolveLocalFileSystemURL(path,
function (fileSystem) {
var reader = fileSystem.createReader();
reader.readEntries(
function (entries) {
console.log(entries);
},
function (err) {
console.log(err);
}
);
}, function (err) {
console.log(err);
}
);
}
```

Any folder names that contain an @ symbol become a file incorrectly

screen shot 2019-01-23 at 12 02 04 pm

Despite containing multiple files

screen shot 2019-01-23 at 12 02 32 pm 1

Any directories without an @ in their name are unaffected

screen shot 2019-01-23 at 12 03 50 pm

Any assistance would be greatly appreciated

Contributor guide

Open the contributing guide

Research direction

Start by reproducing listDir with a directory whose name contains @, then trace resolveLocalFileSystemURL through createReader and readEntries to identify where the directory is classified as a file. Done means readEntries returns the directory as a directory with its contents, while directories without @ continue to work.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.