ebidel / filer.js

A wrapper library for the HTML5 Filesystem API what reuses UNIX commands (cp, mv, ls) for its API.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

filer.open actually ignores onError param

shabunc opened this issue · comments

Minimal example

 var filer = new Filer();
  filer.init({size: 1024 * 1024}, function() {
      filer.open('xxx.data', function() {
        console.log('SUCCESS');
      }, function(e) {
        console.log('ERROR', e);
      });
  });

What do I expect to see:
If xxx.data does not exist, second function should be executed.

What do I actually see:
Uncaught Error: "filesystem:chrome-extension://fcgfaidpicddcilhjhafmmcgfodijhjd/temporary//xxx.data" does not exist.

I guess this should be closed, since there's a PR already.