From a9a389c8287f5a204ee57e6d0a542f85feca94c1 Mon Sep 17 00:00:00 2001 From: Vladimir Agafonkin Date: Fri, 21 Apr 2017 18:32:59 +0300 Subject: [PATCH] partially revert #2657 to fix add command test --- src/util/fs.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/util/fs.js b/src/util/fs.js index 77c493b878..d8ff96fba1 100644 --- a/src/util/fs.js +++ b/src/util/fs.js @@ -218,6 +218,12 @@ async function buildActionsForCopy( if (srcFiles.indexOf(file) < 0) { const loc = path.join(dest, file); possibleExtraneous.add(loc); + + if ((await lstat(loc)).isDirectory()) { + for (const file of await readdir(loc)) { + possibleExtraneous.add(path.join(loc, file)); + } + } } } }