EISDIR: illegal operation on a directory, read
Closed this issue · 3 comments
Hello :)
Thank you for crypticker. I like the idea.
However I'm facing a weird problem. I've created ~/.crypticker/options.json
with the exact JSON you provide in this repo.
Unfortunately I have this :
npm ls crypticker
/Users/spyesx
└── (empty)
But! If this folder and files are created I have an error like :
$ crypticker
fs.js:656
var r = binding.read(fd, buffer, offset, length, position);
^
Error: EISDIR: illegal operation on a directory, read
at Object.fs.readSync (fs.js:656:19)
at tryReadSync (fs.js:457:20)
at Object.fs.readFileSync (fs.js:494:19)
at Object.<anonymous> (/usr/local/lib/node_modules/crypticker/index.js:16:27)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
at Module.require (module.js:498:17)
I might have missed something. Any idea?
Apologies for the delay and thank you for the feedback!
EISDIR
occurs when the script is attempting to open a file, but retrieves a directory instead. From what you said above, it looks like you made a folder called .crypticker
and placed options.json
within it.
What the script is expecting is a file called .crypticker
located in your home directory. My apologies, this isn't as clear as it should be within the documentation.
Try moving the options.json
file up a directory, and renaming it to .crypticker
after removing the directory you created:
mv ~/.crypticker/options.json ~/.crypticker.bak; rm -rf ~/.crypticker; mv ~/.crypticker.bak ~/.crypticker
You could also just write a new options file to ~/.crypticker
after removing the existing directory.
Sorry for the confusion, and thank you for raising this.
I have published a new version (1.2.4) which contains updates to the readme that should clear up some of the confusion.
Hope this helps. If you have any additional feedback or feature requests, I'd love to hear them!
it works like a charm :) Thank you!