Skip to content

Commit 07b6233

Browse files
alqhSBoudrias
authored andcommittedMay 28, 2019
Fix fs.copy twice with glob path fails second time because it tries to do copySingle with the glob path as the glob path is currently in store. (#132) (#133)
1 parent 107d400 commit 07b6233

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎lib/actions/copy.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ exports.copy = function (from, to, options, context, tplSettings) {
2424
var diskFiles = globby.sync(fromGlob, globOptions);
2525
var storeFiles = [];
2626
this.store.each(file => {
27-
if (multimatch([file.path], fromGlob).length !== 0) {
27+
// The store may have a glob path and when we try to copy it will fail because not real file
28+
if (!glob.hasMagic(file.path) && multimatch([file.path], fromGlob).length !== 0) {
2829
storeFiles.push(file.path);
2930
}
3031
});

0 commit comments

Comments
 (0)
Please sign in to comment.