1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/code-server_ynh.git synced 2024-09-03 18:16:28 +02:00

attempt to move the user files to the new path

This commit is contained in:
Tagadda 2022-08-20 20:12:23 +00:00
parent 946ae45589
commit f54b7e1864
2 changed files with 13 additions and 1 deletions

View file

@ -98,7 +98,7 @@ ynh_add_nginx_config
#=================================================
ynh_script_progression --message="Creating a data directory..." --weight=2
datadir=/home/yunohost.app/$app
datadir=/home/$app/.local/share/code-server
ynh_app_setting_set --app=$app --key=datadir --value=$datadir
mkdir -p $datadir/{user-data,extensions}

View file

@ -97,6 +97,18 @@ then
mkdir -p $final_path
fi
if ynh_compare_current_package_version -c le -v "4.1.0~ynh1"
then
new_datadir=/home/$app/.local/share/code-server
mkdir -p $new_datadir
cp -R $datadir/* $new_datadir
ynh_secure_remove --file=$datadir
datadir=new_datadir
ynh_app_setting_set --app=$app --key=datadir --value=$datadir
fi
#=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE
#=================================================