-
Notifications
You must be signed in to change notification settings - Fork 303
Error: EISDIR
keeps on appearing when using downloadDir
#80
Comments
Error: EISDIR
keeps on appearing when using downloadDir
Just in case anyone is interested in this, I ended up using
This check works for me since I have no files without an extension, but it can be easily modified to accept such cases as well. |
I had similar problem. For most of the buckets everything was working fine, but couple of them were failing with the EISDIR error code. I was able to fix it by setting "maxAsyncS3=1". |
@iMoses solution did not work for me. I don't like the idea of never calling callbacks in general, so I also tried a version where I call the callback after mkdirp, but with @jujokini solution did work, but of course this means a huge reduction in speed. |
@jujokini @bobzoller I can confirm that. It works, but the speed reduction is really a downside. @iMoses I use "/" as delimiter for directories, and from the console output I saw that every directory had the "/" at the end. So I use the getS3Params: function(localFile, s3Object, callback) {
console.log("getS3params for: ", localFile);
if (endsWith(localFile, "/")) {
callback(null, null); // Skip folders
} else {
callback(null, {});
}
} function endsWith(str, suffix) {
return str.indexOf(suffix, str.length - suffix.length) !== -1;
} |
@netzwerch do you think the code snippets you posted would go well in the new https://github.com/andrewrk/node-s3-client#examples section? |
@faceleg Yes, it can definitely help people to work around this problem. |
my assumption was it was a race condition -- that node-s3-client does the right thing with directory-looking-s3-keys like |
I get the same error, I have tried with this: |
I forgot the "/" at the end of my path, and with the @netzwerch solutions, it works. Thanks |
I'm using the
downloadDir
method and every once in a while, for no apparent reason but always on the same directories, I am getting this error:Error: EISDIR, open '/home/imoses/resources/index/FE filters/'
.I tried debugging it but I had no success.
Apparently
graceful-fs
tries to open a write stream on a directory path and I can't seem to understand why.This is my code snippet.
Any help would be appreciated.
Running on:
NodeJS v0.10.25
Ubuntu 14.10
The text was updated successfully, but these errors were encountered: