From 0f93f8f5280108c574ca62f3f0b5a9ec21615f3b Mon Sep 17 00:00:00 2001 From: KRKeegan Date: Thu, 20 Dec 2012 10:26:50 -0800 Subject: [PATCH] Fix for Issue #27 Add a conditional check for the file 1100tags.txt. If it doesn't exist in the user defined data directory, then default to the Pgm_root/data directory. --- web/bin/tagline.pl | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/web/bin/tagline.pl b/web/bin/tagline.pl index 51a35951e..5584744bb 100644 --- a/web/bin/tagline.pl +++ b/web/bin/tagline.pl @@ -3,7 +3,12 @@ # Authority: anyone -@ARGV = "$config_parms{data_dir}/remarks/1100tags.txt"; +if (-e "$config_parms{data_dir}/remarks/1100tags.txt"){ + @ARGV = "$config_parms{data_dir}/remarks/1100tags.txt"; +} +else{ + @ARGV = "$Pgm_Root/data/remarks/1100tags.txt"; +} my $tagline; rand($.) < 1 && ($tagline=$_) while <>;