Skip to content

Commit

Permalink
🐛 Include hidden files in check for orphaned files (#160)
Browse files Browse the repository at this point in the history
  • Loading branch information
BetaHuhn authored Feb 8, 2022
1 parent 0673fc4 commit ea27671
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions src/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit ea27671

Please sign in to comment.