holepunchto / hyperdrive

Hyperdrive is a secure, real time distributed file system
Apache License 2.0
1.86k stars 135 forks source link

Fix for "expected string" error in later Fixname call, Issue #309 #310

Closed 4c656554 closed 2 years ago

4c656554 commented 3 years ago

Issue #309

andrewosh commented 3 years ago

@4c656554 thanks for this, and sorry for being slow to review. Mind adding a test case for this, especially one to make sure that the callback is still handled correctly?

4c656554 commented 3 years ago

@andrewosh Thanks, correct me if I'm wrong, but I don't think it's possible (or it is possible then it'd be pretty strange) to call download with path undefined and with a callback.

Perhaps a better fix would be to change the function def:

download (path="", opts, cb) { ...

If you agree, I'll create a new commit with that?

Also, I've suggested a test case based on the directory download case, see #312