Skip to content

fix(update): iterate old backups safely when names have spaces - #3247

Open
patil2001 wants to merge 1 commit into
Osmantic:mainfrom
patil2001:fix/update-backup-loop
Open

fix(update): iterate old backups safely when names have spaces#3247
patil2001 wants to merge 1 commit into
Osmantic:mainfrom
patil2001:fix/update-backup-loop

Conversation

@patil2001

Copy link
Copy Markdown
Contributor

for dir in $backup_dirs word-splits the find output, so a backup directory with a space in its name gets split and the retention prune (rm -rf "$dir") never removes the intended backup.

Read the find output line-by-line into the loop instead.

Word-splitting the find output defeated retention pruning for any backup dir containing a space.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant