fixed bug with starting category with /.

This commit is contained in:
Dylan Araps 2019-02-26 00:01:19 +02:00
parent 882ee31585
commit 02155b72ce

5
pash
View File

@ -163,8 +163,11 @@ main() {
[[ $2 == */* && $2 == *../* ]] && [[ $2 == */* && $2 == *../* ]] &&
die "Category went out of bounds." die "Category went out of bounds."
[[ $2 == /* ]] &&
die "Category can't start with '/'."
[[ $2 == */* ]] && [[ $2 == */* ]] &&
{ mkdir -p "${1%/*}" || die "Couldn't create category '${1%/*}'.";} { mkdir -p "${2%/*}" || die "Couldn't create category '${2%/*}'.";}
umask 077 umask 077