Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

fix(files.add): handle weird directory names #1153

Closed
wants to merge 21 commits into from

Conversation

richardschneider
Copy link
Contributor

@richardschneider richardschneider commented Dec 16, 2017

glob was interpreting the '[' in wierd [v0] as a special magic character. According to its documentation, a caller should be able to escape it with \; but it does not work.

See the glob issue.

@ghost ghost added the status/in-progress In progress label Dec 16, 2017
@richardschneider
Copy link
Contributor Author

@diasdavid Both travis and circle are queuing the build! Hopefully, they will get built by the time you get around to this.

Copy link
Member

@daviddias daviddias left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a test too?

@richardschneider
Copy link
Contributor Author

@diasdavid it looks like some wrong code has entered js-ipfs. Here's some errors from my last build on Circle CI

1) HTTP API
       ## interface-ipfs-core over ipfs-api
         .files
           .cat
             errors on unknown path:
     AssertionError: expected 'd.end is not a function' to be one of [ Array(2) ]
      at ipfs.files.cat.catch (node_modules/interface-ipfs-core/src/files.js:439:36)
      at <anonymous>
      at process._tickCallback (internal/process/next_tick.js:160:7)

  2) interface-ipfs-core tests
       .files
         .cat
           errors on unknown path:
     Uncaught TypeError: d.end is not a function
      at pull.collect (src/core/components/files.js:140:20)
      at node_modules/pull-stream/sinks/reduce.js:10:5
      at node_modules/pull-stream/sinks/drain.js:20:24
      at node_modules/pull-stream/throughs/map.js:19:9
      at node_modules/pull-stream/throughs/filter.js:17:11
      at node_modules/pull-stream/throughs/filter.js:17:11
      at node_modules/pull-stream/throughs/filter.js:17:11
      at node_modules/pull-stream/throughs/flatten.js:35:20
      at drain (node_modules/pull-paramap/index.js:23:11)
      at node_modules/pull-paramap/index.js:63:9
      at nextStream (node_modules/pull-stream/throughs/flatten.js:33:9)
      at node_modules/pull-stream/throughs/flatten.js:21:29
      at node_modules/pull-stream/sources/empty.js:5:5
      at nextChunk (node_modules/pull-stream/throughs/flatten.js:20:9)
      at node_modules/pull-stream/throughs/flatten.js:41:11
      at drain (node_modules/pull-paramap/index.js:19:11)
      at node_modules/pull-paramap/index.js:45:13
      at dag.get (node_modules/ipfs-unixfs-engine/src/exporter/resolve.js:42:9)
      at _get (node_modules/ipld-resolver/src/index.js:133:9)
      at node_modules/async/internal/once.js:12:16
      at next (node_modules/async/waterfall.js:21:29)
      at node_modules/async/internal/onlyOnce.js:12:16
      at r.util.deserialize (node_modules/ipld-resolver/src/index.js:371:13)
      at multihashing (node_modules/ipld-dag-pb/src/dag-node/create.js:61:7)
      at Multihashing.Multihashing.digest (node_modules/multihashing-async/src/index.js:33:5)
      at setImmediate (node_modules/multihashing-async/src/utils.js:8:7)
      at Immediate.<anonymous> (node_modules/async/internal/setImmediate.js:27:16)

  3) interface-ipfs-core tests
       .pubsub
         single node
           .subscribe
             to one topic with Promise:
     Uncaught TypeError: callback is not a function
      at setImmediate (src/core/components/pubsub.js:27:28)
      at Immediate.<anonymous> (node_modules/async/internal/setImmediate.js:27:16)

  4) interface-ipfs-core tests
       .pubsub
         single node
           .subscribe
             to one topic with options and Promise:
     Uncaught TypeError: callback is not a function
      at setImmediate (src/core/components/pubsub.js:27:28)
      at Immediate.<anonymous>

@daviddias
Copy link
Member

@richardschneider can you rebase master onto this branch?

@richardschneider
Copy link
Contributor Author

I've never rebased, I only do merge. Can you give me the instructions.

@daviddias
Copy link
Member

@richardschneider There are some really good tutorials out there that will give you a full understanding of what rebase means:

Let me know if this works for you, otherwise, I can do it for now and you can practice in another repo. You will use it more times in the future.

@richardschneider
Copy link
Contributor Author

I've broken this with the rebase. Will open another PR.

@ghost ghost removed the status/in-progress In progress label Dec 17, 2017
@daviddias daviddias deleted the weird-dirname branch December 18, 2017 12:57
MicrowaveDev pushed a commit to galtproject/js-ipfs that referenced this pull request May 22, 2020
* refactor: convert block API to async/await

depends on:

* [ ] ipfs-inactive/js-ipfs-http-client#1150

License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>

* feat: support the version param

License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>

* refactor: convert DAG API to async/await

License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>

* fix: add util to convert a single buffer to a form data object

License: MIT
Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>

* fix: exported function
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants