]> git.donarmstrong.com Git - bin.git/commitdiff
* check existance of $tododb
authorDon Armstrong <don@donarmstrong.com>
Sat, 11 Oct 2008 19:47:59 +0000 (19:47 +0000)
committerDon Armstrong <don@donarmstrong.com>
Sat, 11 Oct 2008 19:47:59 +0000 (19:47 +0000)
stodo

diff --git a/stodo b/stodo
index 48acf4f16a0c332f0c59d80fcdfa17f7fb3fa672..9534404b6f657caa71bf5a30d838e0413da91723 100755 (executable)
--- 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);