]> git.donarmstrong.com Git - infobot.git/commitdiff
change ~ to ENV{HOME}
authordms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Tue, 12 Dec 2000 15:12:20 +0000 (15:12 +0000)
committerdms <dms@c11ca15a-4712-0410-83d8-924469b57eb5>
Tue, 12 Dec 2000 15:12:20 +0000 (15:12 +0000)
git-svn-id: https://svn.code.sf.net/p/infobot/code/trunk/blootbot@196 c11ca15a-4712-0410-83d8-924469b57eb5

src/core.pl

index 4faff2fb4ec8f32587f4dc41aeed5c4070bea8a6..7a6ce0b58ae062d3456c00af0d941f216b119f98 100644 (file)
@@ -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}");