From 02155b72ce44e46ad4792352c2c339f7a071967c Mon Sep 17 00:00:00 2001 From: Dylan Araps Date: Tue, 26 Feb 2019 00:01:19 +0200 Subject: [PATCH] fixed bug with starting category with /. --- pash | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pash b/pash index abc6b5a..e4a5414 100755 --- a/pash +++ b/pash @@ -163,8 +163,11 @@ main() { [[ $2 == */* && $2 == *../* ]] && die "Category went out of bounds." + [[ $2 == /* ]] && + die "Category can't start with '/'." + [[ $2 == */* ]] && - { mkdir -p "${1%/*}" || die "Couldn't create category '${1%/*}'.";} + { mkdir -p "${2%/*}" || die "Couldn't create category '${2%/*}'.";} umask 077