mirror of
https://github.com/dockur/windows.git
synced 2025-10-27 19:35:49 +00:00
feat: Sanitize filename
This commit is contained in:
parent
1ef8a9932b
commit
bc6a34b366
1 changed files with 1 additions and 2 deletions
|
|
@ -60,8 +60,7 @@ if [ ! -f "$STORAGE/$BASE" ]; then
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
BASE=$(basename "$VERSION")
|
BASE=$(basename "${VERSION%%\?*}")
|
||||||
BASE="${BASE%%\?*}"
|
|
||||||
: "${BASE//+/ }"; printf -v BASE '%b' "${_//%/\\x}"
|
: "${BASE//+/ }"; printf -v BASE '%b' "${_//%/\\x}"
|
||||||
BASE=$(echo "$BASE" | sed -e 's/[^A-Za-z0-9._-]/_/g')
|
BASE=$(echo "$BASE" | sed -e 's/[^A-Za-z0-9._-]/_/g')
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue