mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2024-12-22 18:18:59 +00:00
fixed issue #3: a simple file check on the key is now performed before creating the tomb
This commit is contained in:
parent
b18ef6c27b
commit
3f0d3dabfc
12
src/tomb
12
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}"
|
||||
|
Loading…
Reference in New Issue
Block a user