From 4cb16f79b2ebc8b9681c9e0a81558ef177cd6031 Mon Sep 17 00:00:00 2001 From: Ira Rice Date: Sat, 17 Jan 2009 21:42:55 -0700 Subject: While the old behavior works, I think most people would appreciate not having to specify a full file path. Now, if you invoke the /record command, you only need to specify a file name, and it'll save a log to the .aethyra directory. Should help stop failures based on not having the priveleges to write to that location. Signed-off-by: Ira Rice --- src/recorder.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/recorder.cpp b/src/recorder.cpp index 7bf618c5..57f030b2 100644 --- a/src/recorder.cpp +++ b/src/recorder.cpp @@ -19,6 +19,8 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ +#include + #include "recorder.h" #include "gui/buttonbox.h" @@ -73,7 +75,9 @@ void Recorder::respond(const std::string &msg) * recorded. */ mChat->chatLog("Starting to record...", BY_SERVER); - mStream.open(msg.c_str(), std::ios_base::trunc); + std::string file = std::string(PHYSFS_getUserDir()) + "/.aethyra/" + msgCopy; + + mStream.open(file.c_str(), std::ios_base::trunc); if (mStream.is_open()) { mButtonBox->setVisible(true); -- cgit v1.2.3-70-g09d2