question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rewrite lib/copy/ncp.js

See original GitHub issue

This needs rewritten. It has several bugs and is overly complex. It was written for use with fs instead of graceful-fs, and contains a lot of concurrency-limiting code that is now unnecessary.

Once rewritten, it may be small enough to inline in lib/copy/copy.js; talk about that later.

I’ll try to do this myself, but help welcome. Adding this to the v1.0.0 milestone, but may have to be pushed back to v2.0.0.

X-Refs: #233.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:18 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jprichardsoncommented, Sep 1, 2017

@manidlou it seemed to make sense to me at the time. As I remember though, @RyanZim may have had some objections, but I don’t recall for sure. I’ll be talking to @RyanZim on Saturday or Monday to check.

1reaction
RyanZimcommented, Feb 25, 2017

Oh man! what a weird cases!

👍

So, I assume it should be the same for symlinks as well, right?

I think so, if I’m following you.

Also is this why we do this https://github.com/jprichardson/node-fs-extra/blob/master/lib/copy/ncp.js#L79 (replacing currentPath with targetPath)?

file.name is an absolute path that contains the source directory. We replace the source directory portion of the path with the dest directory, to obtain the target path.

Read more comments on GitHub >

github_iconTop Results From Across the Web

handle copying between identical files · Issue #198 - GitHub
I hope this module can be as clever as cp. It should recognize copying between identical files and do nothing. Now, v0.26.2, neither...
Read more >
How to use the graceful-fs.readdir function in graceful-fs | Snyk
To help you get started, we've selected a few graceful-fs.readdir examples, based on popular ways it is used in public projects.
Read more >
fs-extra/CHANGELOG.md - UNPKG
379, * Rewrote module into JavaScript. (Must still rewrite tests into JavaScript) ... "Rewrite lib/copy/ncp.js [enhancement, feature-copy]".
Read more >
Error in sample .babylon code - Bugs
ok I tried to change back to using Sceneloader. ... \GitHub\babylonjs_project_editor\electron_app\node_modules\fs-extra\lib\copy\ncp.js:91
Read more >
jprichardson/node-fs-extra | Coveralls - Test Coverage ... - Coveralls.io
lib/move/index.js, 158, 86, 67, 19, 4.0. 87.88. lib/mkdirs/mkdirs-sync.js, 58, 33, 29, 4, 1239.0. 91.18. lib/copy/ncp.js, 235, 136, 124, 12, 82.0.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found