From ea276716587e6fc12f36b38e226579bc60c8565c Mon Sep 17 00:00:00 2001 From: Maximilian Schiller <schiller@mxis.ch> Date: Tue, 8 Feb 2022 14:13:51 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Include=20hidden=20files=20in=20?= =?UTF-8?q?check=20for=20orphaned=20files=20(#160)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dist/index.js | 4 ++-- src/helpers.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index 78a12837..a0bb1137 100644 --- a/dist/index.js +++ b/dist/index.js @@ -17829,8 +17829,8 @@ const copy = async (src, dest, deleteOrphaned, exclude) => { // If it is a directory and deleteOrphaned is enabled - check if there are any files that were removed from source dir and remove them in destination dir if (deleteOrphaned) { - const srcFileList = await readfiles(src, { readContents: false }) - const destFileList = await readfiles(dest, { readContents: false }) + const srcFileList = await readfiles(src, { readContents: false, hidden: true }) + const destFileList = await readfiles(dest, { readContents: false, hidden: true }) for (const file of destFileList) { if (srcFileList.indexOf(file) === -1) { diff --git a/src/helpers.js b/src/helpers.js index d7046812..9e0cfb4e 100644 --- a/src/helpers.js +++ b/src/helpers.js @@ -80,8 +80,8 @@ const copy = async (src, dest, deleteOrphaned, exclude) => { // If it is a directory and deleteOrphaned is enabled - check if there are any files that were removed from source dir and remove them in destination dir if (deleteOrphaned) { - const srcFileList = await readfiles(src, { readContents: false }) - const destFileList = await readfiles(dest, { readContents: false }) + const srcFileList = await readfiles(src, { readContents: false, hidden: true }) + const destFileList = await readfiles(dest, { readContents: false, hidden: true }) for (const file of destFileList) { if (srcFileList.indexOf(file) === -1) {