Comments (3)
After some digging found the problem / difference with versions prior to v9: in case the destination path given is absolute, the source path is stripped and - as stated - all source directories are omitted / flattened.
96ll
if (path.isAbsolute(destination)) { return path.join(destination, entry.name); }
That definitely hadn't been the case in versions prior v9 - and it makes no sense to me.
from cpy.
Did you read the release notes? It shows how to migrate the option.
from cpy.
I did read them - maybe i didn't understand correctly. From what i understood "parents" should not be neccessary anymore
Old:
cpy('.github/**', 'dest', {parents: true})New:
cpy('.github', 'dest')
and that's what i tried with
cpy(source, destination)
but that's flattened anyhow?
from cpy.
Related Issues (20)
- Support flat mode for copying a single file HOT 2
- Suggestion: Handler 'done' for report of completion HOT 1
- Feature: preserveTimestamps
- wildcard vs explicit paths have different output HOT 3
- Adding file sourcePath and destinationPath to the progress HOT 1
- cwd ignored when copying files HOT 6
- Can commonjs be supported HOT 2
- when `rename` is a function, `basename` does not contain the file extension from 9.x HOT 1
- Change from progress event to `onProgress` option
- Directory structure not maintained during copy HOT 6
- Possible data-loss bug when using absolute paths
- Failed to copy files into a drive (C:, D:) on Windows HOT 1
- [Security] Update globby dependency to mitigate issue in glob-parent HOT 2
- import error HOT 1
- Strange behavior on latest `recursive` mode HOT 2
- Wrong dependencies resolution HOT 2
- Dependency globby security vulnerability HOT 5
- cpy has transitive dependencies with a CVE vulnerability HOT 7
- Add tests for fixed recursive bugs [NO NEW FEATURES WILL BE ADDED UNTIL THIS IS DONE]
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cpy.