From: Don Armstrong Date: Sat, 11 Oct 2008 19:47:59 +0000 (+0000) Subject: * check existance of $tododb X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=b4ad8b8c65c9c97915078d8f946a3085e6ec7fda;p=bin.git * check existance of $tododb --- diff --git a/stodo b/stodo index 48acf4f..9534404 100755 --- a/stodo +++ b/stodo @@ -109,6 +109,9 @@ my $tododb = exists $ENV{TODODB} ? $ENV{TODODB} : '.todo'; if ($tododb !~ m#^/#) { $tododb = cwd().'/'.$tododb; } +if (not -r $tododb) { + "$tododb does not exist or is not readable"; +} $tododb = full_readlink($tododb); my $base_dir = dirname($tododb); my $tododb_name = basename($tododb);