[fix] Remove backup file list temp files after backup#264
Conversation
The cleanup at the end of backup_configuration() used a glob inside double
quotes -- rm "${BACKUP_FILE_LIST}*" -- so the shell did not expand the "*"
and rm tried to delete a single file literally named
"backup_file_list.conf*", which never exists. This failed on every
configuration update ("rm: can't remove '.../backup_file_list.conf*'") and
left backup_file_list.conf and backup_file_list.conf.tmp behind in the
working directory (tmpfs on devices).
Delete the two files that are actually created, with -f so a missing file
is not an error.
Signed-off-by: Michael Uray <michaeluray@users.noreply.github.com>
|
Warning Review limit reached
Next review available in: 1 minute Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (1)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Files Reviewed (1 files)
Reviewed by hy3:free · Input: 33.6K · Output: 875 · Cached: 76.4K |
Problem
The cleanup at the end of
backup_configuration()uses a glob inside doublequotes:
rm "${BACKUP_FILE_LIST}*"The shell does not expand the
*inside quotes, sormtries to delete asingle file literally named
backup_file_list.conf*, which never exists. Thisfails on every configuration update (
rm: can't remove '.../backup_file_list.conf*') and leavesbackup_file_list.confandbackup_file_list.conf.tmpbehind in the working directory (tmpfs on devices).Fix
Delete the two files that are actually created, with
-fso a missing file isnot an error.
Testing
shellcheck,shfmt,./run-qa-checksand./runtestsall pass.