From ba2674e6d848a5951819dcc0f4f3f321e9311a77 Mon Sep 17 00:00:00 2001
From: dms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
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@196 c11ca15a-4712-0410-83d8-924469b57eb5
---
 blootbot/src/core.pl | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/blootbot/src/core.pl b/blootbot/src/core.pl
index 4faff2f..7a6ce0b 100644
--- a/blootbot/src/core.pl
+++ b/blootbot/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