Skip to content

Commit ea27671

Browse files
authored
🐛 Include hidden files in check for orphaned files (#160)
1 parent 0673fc4 commit ea27671

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

dist/index.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -17829,8 +17829,8 @@ const copy = async (src, dest, deleteOrphaned, exclude) => {
1782917829
// 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
1783017830
if (deleteOrphaned) {
1783117831

17832-
const srcFileList = await readfiles(src, { readContents: false })
17833-
const destFileList = await readfiles(dest, { readContents: false })
17832+
const srcFileList = await readfiles(src, { readContents: false, hidden: true })
17833+
const destFileList = await readfiles(dest, { readContents: false, hidden: true })
1783417834

1783517835
for (const file of destFileList) {
1783617836
if (srcFileList.indexOf(file) === -1) {

src/helpers.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ const copy = async (src, dest, deleteOrphaned, exclude) => {
8080
// 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
8181
if (deleteOrphaned) {
8282

83-
const srcFileList = await readfiles(src, { readContents: false })
84-
const destFileList = await readfiles(dest, { readContents: false })
83+
const srcFileList = await readfiles(src, { readContents: false, hidden: true })
84+
const destFileList = await readfiles(dest, { readContents: false, hidden: true })
8585

8686
for (const file of destFileList) {
8787
if (srcFileList.indexOf(file) === -1) {

0 commit comments

Comments
 (0)