Fix minor issue with logfile
authorclinton <clinton@unknownlamer.org>
Tue, 24 Feb 2009 03:50:03 +0000 (03:50 +0000)
committerclinton <clinton@unknownlamer.org>
Tue, 24 Feb 2009 03:50:03 +0000 (03:50 +0000)
Oops, logFileName is a class member and not a local
variable...prepending it with the logs_dir is not ok.

source/Bot.C

index 679750e..ed8aa50 100644 (file)
@@ -752,14 +752,14 @@ Bot::destroy_user_functions ()
 void
 Bot::set_log_file (String name)
 {
-  logFileName = logs_dir + name;
+  logFileName = name;
   logFile.close ();
   logFile.clear ();
 #if HAVE_IOSBASE
-  logFile.open(logFileName.c_str (), std::ios_base::out | 
+  logFile.open((logs_dir + logFileName).c_str (), std::ios_base::out | 
               std::ios_base::ate | std::ios_base::app);
 #else
-  logFile.open(logFileName.c_str (), ios::out | ios::ate 
+  logFile.open((logs_dir + logFileName).c_str (), ios::out | ios::ate 
              | ios::app);
 #endif