Skip to content

Commit 20daf66

Browse files
author
Your Name
committed
added comments, fixed blank table on hiphen error
1 parent 2217cc0 commit 20daf66

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

share/adapters/chmod.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ chmod_calc(){
5656
# If permission string is given -> calc number
5757
elif [[ $1 =~ ^[r,s,S,t,T,w,x,-]+$ ]]
5858
then
59+
# FULL STRING
5960
if [[ ${#1} -eq 9 ]]
6061
then
6162
p_s=$1
@@ -89,6 +90,7 @@ chmod_calc(){
8990
fi
9091
p_n+="$num"
9192
done
93+
# PARTIAL STRING
9294
elif [[ $1 =~ ^[r,s,t,w,x]+$ ]]
9395
then
9496
p_s='---------'
@@ -136,6 +138,8 @@ chmod_calc(){
136138
sticky='X'
137139
fi
138140
p_n="${p_n0}${p_n1}${p_n2}${p_n3}"
141+
else
142+
return 1
139143
fi
140144
else
141145
return 1

0 commit comments

Comments
 (0)