From b4ad8b8c65c9c97915078d8f946a3085e6ec7fda Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Sat, 11 Oct 2008 19:47:59 +0000 Subject: [PATCH] * check existance of $tododb --- stodo | 3 +++ 1 file changed, 3 insertions(+) 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); -- 2.39.2