tFixed integer checking of -s param - tomb - the crypto undertaker
HTML git clone git://parazyd.org/tomb.git
DIR Log
DIR Files
DIR Refs
DIR README
DIR LICENSE
---
DIR commit f2ba4136b8295dff54b34585e09b4f70c3b327ed
DIR parent 3fe53affc98e02ffa807367a93def1bd242fc4fd
HTML Author: Anathema <anathema@anche.no>
Date: Sun, 28 Aug 2011 16:54:00 +0200
Fixed integer checking of -s param
Diffstat:
M src/tomb | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
DIR diff --git a/src/tomb b/src/tomb
t@@ -353,7 +353,12 @@ create_tomb() {
tombname=${tombfile%%\.*}
tombfile=${tombname}.tomb
tombsize=$opts[-s]
-
+
+ if [[ $tombsize != <-> ]]; then
+ error "Size is not an integer"
+ return 1
+ fi
+
if [ -e ${tombdir}/${tombfile} ]; then
error "tomb exists already. I'm not digging here:"
ls -lh ${tombdir}/${tombfile}