mirror of
https://github.com/tmux-plugins/tmux-resurrect.git
synced 2024-11-22 04:18:48 +00:00
remove_old_backups() : replace xargs with -exec to handle 0 files found
by find better
This commit is contained in:
parent
dcef21995a
commit
5f3873c502
@ -283,7 +283,7 @@ remove_old_backups() {
|
|||||||
local -a files
|
local -a files
|
||||||
files=($(ls -t $(resurrect_dir)/${RESURRECT_FILE_PREFIX}_*.${RESURRECT_FILE_EXTENSION} | tail -n +6))
|
files=($(ls -t $(resurrect_dir)/${RESURRECT_FILE_PREFIX}_*.${RESURRECT_FILE_EXTENSION} | tail -n +6))
|
||||||
[[ ${#files[@]} -eq 0 ]] ||
|
[[ ${#files[@]} -eq 0 ]] ||
|
||||||
find "${files[@]}" -type f -mtime +30 | xargs rm
|
find "${files[@]}" -type f -mtime +30 -exec rm -v "{}" \;
|
||||||
}
|
}
|
||||||
|
|
||||||
save_all() {
|
save_all() {
|
||||||
|
Loading…
Reference in New Issue
Block a user