filer.js icon indicating copy to clipboard operation
filer.js copied to clipboard

Uncaught error when trying to filer.open() a directory

Open bennlich opened this issue 11 years ago • 2 comments

I'll try and patch this when I get a chance.

bennlich avatar Mar 10 '14 21:03 bennlich

Did you get anywhere with this? I'm experiencing a roadblock so would appreciate a little help with how to patch or a workaround to check the file exists beforehand!

1updesign avatar Aug 13 '14 17:08 1updesign

Doesn't look like I ever ended up fixing this, but I think what you want is to check something like:

if (!fileEntry.isFile) {
  // do something with opt_errorHandler
}
else {
  fileEntry.file(successCallback, opt_errorHandler);
}

right around here: https://github.com/ebidel/filer.js/blob/master/src/filer.js#L599.

bennlich avatar Aug 15 '14 17:08 bennlich