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.

fs.copy() with clobber set to false return EEXIST error

See original GitHub issue

In version 1.0.0, fs.copy() with clobber set to false return an EEXIST error.

I think this is a bug because we explicitly set clobber to false (overwrite existing file), so this should not return an error !

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
jprichardsoncommented, Dec 6, 2016

@jprichardson What should be the default behavior here for v2?

It should revert back to the behavior pre-1.0.0. We should then add a flag to error on exist / continue on exist… whatever seems to have the most clarity.

2reactions
DanielSchwiperichcommented, Nov 23, 2016

@popod is right on this imho. We set it explicitly to false, so we know that there are files already existing and don’t want them to be overwritten. The copy process should not stop then.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Copy clobber flag never err even when true · Issue #272 ... - GitHub
In the following code err is never not null: fs.copy(sourcePath, targetPath, { clobber: ... fs.copy() with clobber set to false return EEXIST error...
Read more >
fs-extra/CHANGELOG.md - UNPKG
The CDN for fs-extra. ... 140, - Fix wrong `chmod` values in `fs.remove()` ... "fs.copy() with clobber set to false return EEXIST error...
Read more >
Move all files in directory to parent with node.js - Stack Overflow
use the mv npm module. mv first tries a fs.rename, and if it fails, uses copy then unlink : mv('source/dir', 'dest/a/b/c/dir', ...
Read more >
Node.js: fs-extra - npm
copy(). copy(src, dest, [options], callback). Copy a file or directory. ... If function, return true to include, false to exclude.
Read more >
API Reference — fsspec 2022.11.0+13.g0974514.dirty ...
Given a path or paths, return one OpenFile object. Parameters. urlpath: string or list. Absolute or relative filepath. Prefix with a protocol like...
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