mirror of
https://github.com/tmux-plugins/tmux-resurrect.git
synced 2024-11-21 20:08:48 +00:00
Use 'xargs rm' instead of 'find -delete'
This commit is contained in:
parent
241f62089a
commit
3a31bfbbb8
@ -282,7 +282,8 @@ remove_old_backups() {
|
||||
# remove resurrect files older than 30 days, but keep at least 5 copies of backup.
|
||||
local -a files
|
||||
files=($(ls -t $(resurrect_dir)/${RESURRECT_FILE_PREFIX}_*.${RESURRECT_FILE_EXTENSION} | tail -n +6))
|
||||
[[ ${#files[@]} -eq 0 ]] || find "${files[@]}" -type f -mtime +30 -delete
|
||||
[[ ${#files[@]} -eq 0 ]] ||
|
||||
find "${files[@]}" -type f -mtime +30 | xargs rm
|
||||
}
|
||||
|
||||
save_all() {
|
||||
|
Loading…
Reference in New Issue
Block a user