From 3f0d3dabfcec3e1e1bed7a5108372601b3240037 Mon Sep 17 00:00:00 2001 From: Anathema Date: Mon, 1 Aug 2011 22:11:57 +0200 Subject: [PATCH] fixed issue #3: a simple file check on the key is now performed before creating the tomb --- src/tomb | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/tomb b/src/tomb index 77c025a..e85a3cc 100755 --- a/src/tomb +++ b/src/tomb @@ -311,9 +311,15 @@ create_tomb() { tombfile=${tombname}.tomb if [ -e ${tombdir}/${tombfile} ]; then - error "tomb exists already. I'm not digging here:" - ls -lh ${tombdir}/${tombfile} - return 1 + error "tomb exists already. I'm not digging here:" + ls -lh ${tombdir}/${tombfile} + return 1 + fi + + if [ -e ${tombdir}/${tombfile}.key ]; then + error "tomb key already exists. Quitting." + ls -lh ${tombdir}/${tombfile}.key + return 1 fi notice "Creating a new tomb in ${tombdir}/${tombfile}"