Skip to content

Commit

Permalink
minor refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
brillout committed Jun 12, 2024
1 parent 1eb9344 commit 8129c78
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@ function removeIgnoredDirectories(somePath: string, ignoredDirs: string[], remov
return false
}
if (removeParenthesesDirs && dir.startsWith('(') && dir.endsWith(')')) {
const dirname = dir.slice(1, -1)
assertRedundantParentheses(dir, dirname, ignoredDirs, somePath)
assertRedundantParentheses(dir, ignoredDirs, somePath)
return false
}
return true
Expand All @@ -150,7 +149,8 @@ function removeIgnoredDirectories(somePath: string, ignoredDirs: string[], remov
if (somePath === '') somePath = '/'
return somePath
}
function assertRedundantParentheses(dir: string, dirname: string, ignoredDirs: string[], somePath: string) {
function assertRedundantParentheses(dir: string, ignoredDirs: string[], somePath: string) {
const dirname = dir.slice(1, -1)
if (!ignoredDirs.includes(dirname)) {
return
}
Expand Down

0 comments on commit 8129c78

Please sign in to comment.