Skip to content

Commit 9cade20

Browse files
committed
updater: don't show backup error if a file in the backup list doesn't exist
i.e. if drastic isn't installed
1 parent 9c37cd5 commit 9cade20

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

static/Updater/backup.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ else
3535
log_message "Creating backup of user data - $BACKUP_LOCATION"
3636
display_msg -t "Backing up user data..."
3737

38-
if tar -czvf "$BACKUP_LOCATION" -T backup_list.txt >> "$BACKUP_LOG" 2>&1; then
38+
if while IFS= read -r f; do [ -e "$f" ] && echo "$f"; done < backup_list.txt | \
39+
tar -czvf "$BACKUP_LOCATION" -T - >> "$BACKUP_LOG" 2>&1; then
3940
log_message "Updater: successfully backed up files" "$BACKUP_LOG"
4041
display_msg -d 1500 -t "Successfully backed up user data"
4142
else

0 commit comments

Comments
 (0)