1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/nextcloud_ynh.git synced 2024-09-03 19:55:57 +02:00

[fix] Use the old owncloud method to copy apps dir

This commit is contained in:
root 2019-02-26 00:57:24 +01:00
parent 3b16063a82
commit c71a444a94

View file

@ -49,7 +49,7 @@ fi
current_version=$(grep OC_VersionString "$final_path/version.php" | cut -d\' -f2)
current_major_version=${current_version%%.*}
if [ $current_major_version -gt 11 ]
if [ $current_major_version -gt 15 ]
then
# Inform the backup/restore process that it should not save the data directory
ynh_app_setting_set $app backup_core_only 1
@ -205,8 +205,10 @@ do
# Backup 3rd party applications from the current nextcloud
# But do not overwrite if there is any upgrade
# (apps directory already exists in Nextcloud archive)
touch -t 197001010000 $final_path/apps/*
cp -a --update "$final_path/apps" "$tmpdir"
for nc_app_dir in $(sudo ls "${final_path}/apps"); do
[[ ! -d "${tmpdir}/apps/${nc_app_dir}" ]] \
&& cp -a "${final_path}/apps/${nc_app_dir}" "${tmpdir}/apps/${nc_app_dir}"
done
# Replace the old nextcloud by the new one
ynh_secure_remove "$final_path"