Skip to content

Commit

Permalink
Add -ignore_readdir_race to find to prevent errors if a file has alre…
Browse files Browse the repository at this point in the history
…ady been deleted
  • Loading branch information
DavidHuber-NOAA committed Sep 5, 2024
1 parent e0a632f commit b502db3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions scripts/exglobal_cleanup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ function remove_files() {
find_exclude_string="${find_exclude_string[*]/%-or}"
# Remove all regular files that do not match
# shellcheck disable=SC2086
find "${directory}" -type f -not \( ${find_exclude_string} \) -delete
find "${directory}" -type f -not \( ${find_exclude_string} \) -ignore_readdir_race -delete
# Remove all symlinks that do not match
# shellcheck disable=SC2086
find "${directory}" -type l -not \( ${find_exclude_string} \) -delete
find "${directory}" -type l -not \( ${find_exclude_string} \) -ignore_readdir_race -delete
# Remove any empty directories
find "${directory}" -type d -empty -delete
}
Expand Down

0 comments on commit b502db3

Please sign in to comment.