Skip to content

Commit

Permalink
Fix fs.copy twice with glob path fails second time because it tries t…
Browse files Browse the repository at this point in the history
…o do copySingle with the glob path as the glob path is currently in store. (#132) (#133)
  • Loading branch information
alqh authored and SBoudrias committed May 28, 2019
1 parent 107d400 commit 07b6233
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/actions/copy.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ exports.copy = function (from, to, options, context, tplSettings) {
var diskFiles = globby.sync(fromGlob, globOptions);
var storeFiles = [];
this.store.each(file => {
if (multimatch([file.path], fromGlob).length !== 0) {
// The store may have a glob path and when we try to copy it will fail because not real file
if (!glob.hasMagic(file.path) && multimatch([file.path], fromGlob).length !== 0) {
storeFiles.push(file.path);
}
});
Expand Down

0 comments on commit 07b6233

Please sign in to comment.