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

Fix directory parsing

This commit is contained in:
Jimmy Monin 2019-03-23 21:27:02 +01:00
parent 3e1f3c2bc1
commit 6944dac81a

View file

@ -205,13 +205,16 @@ 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)
for nc_app_dir in "$(ls -1 "$final_path/apps")"
(
cd $final_path/apps
for nc_app_dir in */
do
if [ ! -d "$tmpdir/apps/$nc_app_dir" ]
then
cp -a "$final_path/apps/$nc_app_dir" "$tmpdir/apps/$nc_app_dir"
fi
if [ ! -d "$tmpdir/apps/$nc_app_dir" ]
then
cp -a "$nc_app_dir" "$tmpdir/apps/$nc_app_dir"
fi
done
)
# Replace the old nextcloud by the new one
ynh_secure_remove "$final_path"