vinyl-fs: Symlink following logic in src() seems wrong to me
Basically, the generated vinyl file base should be what’s set to to the symlink itself:
Say the src directory structure is like:
|-- foo
|-- bar -> baz
|-- baz
|-- qux.txt
the symlink should produce: ./target/foo/bar at the end with qux.txt in it if dest is set to target. In practice it doesn’t.
The reason is the file base should always be set to ./foo for anything linked by bar whereas the original recursive logic would produce foo/baz.
Such incorrect logic would yield a flattened file structure and empty directories at the end:
pipe(gulp.dest('target'))
the original logic would generate:
|-- target
|-- foo
|-- baz (empty)
|-- qux.txt
whereas the fixed logic generates:
|-- target
|-- foo
|-- bar
|-- qux.txt
I’ve opened a PR here: https://github.com/gulpjs/vinyl-fs/pull/131 Please check it out.
About this issue
- Original URL
- State: closed
- Created 9 years ago
- Reactions: 1
- Comments: 15 (11 by maintainers)
Commits related to this issue
- Fixes #132 The symlink following logic in src() was incorrect resulting in wrong file.base being generated. * The symlink following logic in src() was incorrect resulting in wrong file.base being gen... — committed to gulpjs/vinyl-fs by xunnanxu 8 years ago
- Fixes #132 The symlink following logic in src() was incorrect resulting in wrong file.base being generated. * The symlink following logic in src() was incorrect resulting in wrong file.base being gen... — committed to gulpjs/vinyl-fs by xunnanxu 8 years ago
- Fixes #132 The symlink following logic in src() was incorrect resulting in wrong file.base being generated. * The symlink following logic in src() was incorrect resulting in wrong file.base being gen... — committed to gulpjs/vinyl-fs by xunnanxu 8 years ago
- Fixes #132 The symlink following logic in src() was incorrect resulting in wrong file.base being generated. * The symlink following logic in src() was incorrect resulting in wrong file.base being gen... — committed to gulpjs/vinyl-fs by xunnanxu 8 years ago
- Fixes #132 The symlink following logic in src() was incorrect resulting in wrong file.base being generated. * The symlink following logic in src() was incorrect resulting in wrong file.base being gen... — committed to gulpjs/vinyl-fs by xunnanxu 8 years ago
- Fixes #132 The symlink following logic in src() was incorrect resulting in wrong file.base being generated. * The symlink following logic in src() was incorrect resulting in wrong file.base being gen... — committed to gulpjs/vinyl-fs by xunnanxu 8 years ago
- Fixes #132 The symlink following logic in src() was incorrect resulting in wrong file.base being generated. * The symlink following logic in src() was incorrect resulting in wrong file.base being gen... — committed to gulpjs/vinyl-fs by xunnanxu 8 years ago
- Fixes #132 The symlink following logic in src() was incorrect resulting in wrong file.base being generated. * The symlink following logic in src() was incorrect resulting in wrong file.base being gen... — committed to gulpjs/vinyl-fs by xunnanxu 8 years ago
- Fixes #132 The symlink following logic in src() was incorrect resulting in wrong file.base being generated. * The symlink following logic in src() was incorrect resulting in wrong file.base being gen... — committed to gulpjs/vinyl-fs by xunnanxu 8 years ago
- Fixes #132 The symlink following logic in src() was incorrect resulting in wrong file.base being generated. * The symlink following logic in src() was incorrect resulting in wrong file.base being gen... — committed to gulpjs/vinyl-fs by xunnanxu 8 years ago
- Fixes #132 The symlink following logic in src() was incorrect resulting in wrong file.base being generated. * The symlink following logic in src() was incorrect resulting in wrong file.base being gen... — committed to gulpjs/vinyl-fs by xunnanxu 8 years ago
- Fixes #132 The symlink following logic in src() was incorrect resulting in wrong file.base being generated. * The symlink following logic in src() was incorrect resulting in wrong file.base being gen... — committed to gulpjs/vinyl-fs by xunnanxu 8 years ago
- Fixes #132 The symlink following logic in src() was incorrect resulting in wrong file.base being generated. * The symlink following logic in src() was incorrect resulting in wrong file.base being gen... — committed to gulpjs/vinyl-fs by xunnanxu 8 years ago
- Fixes #132 The symlink following logic in src() was incorrect resulting in wrong file.base being generated. * The symlink following logic in src() was incorrect resulting in wrong file.base being gen... — committed to gulpjs/vinyl-fs by xunnanxu 8 years ago
- Fixes #132 The symlink following logic in src() was incorrect resulting in wrong file.base being generated. * The symlink following logic in src() was incorrect resulting in wrong file.base being gen... — committed to gulpjs/vinyl-fs by xunnanxu 8 years ago
- Fixes #132 The symlink following logic in src() was incorrect resulting in wrong file.base being generated. * The symlink following logic in src() was incorrect resulting in wrong file.base being gen... — committed to gulpjs/vinyl-fs by xunnanxu 8 years ago
- Fixes #132 The symlink following logic in src() was incorrect resulting in wrong file.base being generated. * The symlink following logic in src() was incorrect resulting in wrong file.base being gen... — committed to gulpjs/vinyl-fs by xunnanxu 8 years ago
- Fixes #132 The symlink following logic in src() was incorrect resulting in wrong file.base being generated. * The symlink following logic in src() was incorrect resulting in wrong file.base being gen... — committed to gulpjs/vinyl-fs by xunnanxu 8 years ago
- Fixes #132 The symlink following logic in src() was incorrect resulting in wrong file.base being generated. * The symlink following logic in src() was incorrect resulting in wrong file.base being gen... — committed to gulpjs/vinyl-fs by xunnanxu 8 years ago
- Fixes #132 The symlink following logic in src() was incorrect resulting in wrong file.base being generated. * The symlink following logic in src() was incorrect resulting in wrong file.base being gen... — committed to gulpjs/vinyl-fs by xunnanxu 8 years ago
Published as 2.4.3 - many thanks to @xunnanxu