Merge pull request #1943 from YunoHost/fix_ynh_restore_everything

Fix ynh_restore_everything
This commit is contained in:
Alexandre Aubin 2024-08-31 18:59:47 +02:00 committed by GitHub
commit 6e84e3532a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -190,7 +190,7 @@ ynh_restore_everything() {
# For each destination path begining by $REL_DIR
cat ${YNH_BACKUP_CSV} | tr --delete $'\r' | grep --only-matching --no-filename --perl-regexp "^\".*\",\"$REL_DIR.*\"$" \
| while read line; do
local ARCHIVE_PATH=$(echo "$line" | grep --only-matching --no-filename --perl-regexp "^\".*\",\"$REL_DIR\K.*(?=\"$)")
local ARCHIVE_PATH=$(echo "$line" | grep --only-matching --no-filename --perl-regexp "^\"\K.*(?=\",\"$REL_DIR.*\"$)")
ynh_restore "$ARCHIVE_PATH"
done
}