summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIra Rice <irarice@gmail.com>2009-01-17 21:42:55 -0700
committerIra Rice <irarice@gmail.com>2009-01-17 21:42:55 -0700
commit4cb16f79b2ebc8b9681c9e0a81558ef177cd6031 (patch)
treed5253c2830f570d2b515258207f4dc56eac91cc9
parentefa25a6392ddd4f987620c43b65204340831b55d (diff)
downloadmana-4cb16f79b2ebc8b9681c9e0a81558ef177cd6031.tar.gz
mana-4cb16f79b2ebc8b9681c9e0a81558ef177cd6031.tar.bz2
mana-4cb16f79b2ebc8b9681c9e0a81558ef177cd6031.tar.xz
mana-4cb16f79b2ebc8b9681c9e0a81558ef177cd6031.zip
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 <irarice@gmail.com>
-rw-r--r--src/recorder.cpp6
1 files changed, 5 insertions, 1 deletions
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 <physfs.h>
+
#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);