markmarijnissen / cordova-file-cache

An awesome File Cache for Cordova Apps.
MIT License
87 stars 29 forks source link

Removing broken links, promise never resolves #24

Open chmac opened 8 years ago

chmac commented 8 years ago

Here's my example:

cache.add('http://google.com/404.json')
cache.download(()=> {}).then(() => {}, (failedUrls) => { console.log('failedUrls', failedUrls) })
// cache.remove('http://google.com/404.json') // <-- this works
cache.remove('http://google.com/404.json').then(() => {console.log('success')}, () => {console.log('failure')})

Neither success nor failure gets logged. My guess from looking at this is that the filesystem promise never resolves / rejects if the file does not exist. Come to think of it, maybe the bug report belongs there?