From 1884d996b65824496227ce089376c306d3c10902 Mon Sep 17 00:00:00 2001 From: dms Date: Tue, 12 Dec 2000 15:12:20 +0000 Subject: [PATCH] change ~ to ENV{HOME} git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@196 c11ca15a-4712-0410-83d8-924469b57eb5 --- src/core.pl | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/core.pl b/src/core.pl index 4faff2f..7a6ce0b 100644 --- a/src/core.pl +++ b/src/core.pl @@ -45,7 +45,7 @@ $wingaterun = time(); $firsttime = 1; ### CHANGE TO STATIC. -$bot_version = "blootbot 1.0.3 (20000930) -- $^O"; +$bot_version = "blootbot cvs (20001212) -- $^O"; $noreply = "NOREPLY"; ########## @@ -174,6 +174,8 @@ sub setup { &status("Setup: ". &countKeys("factoids") ." factoids."); + $param{tempDir} =~ s#\~/#$ENV{HOME}#; + &status("Initial memory usage: $memusage kB"); } @@ -191,6 +193,15 @@ sub setupConfig { exit 1; } + if ($param{tempDir} =~ s#\~/#$ENV{HOME}#) { + &status("Fixing up tempDir."); + } + + if ($param{tempDir} =~ /~/) { + &ERROR("parameter tempDir still contains tilde."); + exit 1; + } + if (! -d $param{tempDir}) { &status("making $param{tempDir}..."); system("mkdir $param{tempDir}"); -- 2.39.5