mirror of
https://github.com/YunoHost-Apps/funkwhale_ynh.git
synced 2024-09-03 18:36:24 +02:00
Add protection to prevent path errors
This commit is contained in:
parent
0af256ba2d
commit
4c84436769
2 changed files with 6 additions and 4 deletions
|
@ -33,16 +33,16 @@
|
||||||
"name": "path",
|
"name": "path",
|
||||||
"type": "path",
|
"type": "path",
|
||||||
"ask": {
|
"ask": {
|
||||||
"en": "Choose a path"
|
"en": "Choose a path (for now, only / works)"
|
||||||
},
|
},
|
||||||
"example": "/funkwhale",
|
"example": "/",
|
||||||
"default": "/funkwhale"
|
"default": "/"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "is_public",
|
"name": "is_public",
|
||||||
"type": "boolean",
|
"type": "boolean",
|
||||||
"ask": {
|
"ask": {
|
||||||
"en": "Should Funkwhale be public accessible?"
|
"en": "Should Funkwhale be publicly accessible?"
|
||||||
},
|
},
|
||||||
"default": "0"
|
"default": "0"
|
||||||
},
|
},
|
||||||
|
|
|
@ -38,6 +38,8 @@ test ! -e "$final_path" || ynh_die "This path already contains a folder"
|
||||||
# Normalize the url path syntax
|
# Normalize the url path syntax
|
||||||
path_url=$(ynh_normalize_url_path "$path_url")
|
path_url=$(ynh_normalize_url_path "$path_url")
|
||||||
|
|
||||||
|
test ! "$path_url" != "/" || ynh_die 'The path should be "/" for now...'
|
||||||
|
|
||||||
# Check web path availability
|
# Check web path availability
|
||||||
ynh_webpath_available "$domain" "$path_url"
|
ynh_webpath_available "$domain" "$path_url"
|
||||||
# Register (book) web path
|
# Register (book) web path
|
||||||
|
|
Loading…
Add table
Reference in a new issue