From 95eaa9d94a188b335009db53db7eca1630cbb74c Mon Sep 17 00:00:00 2001 From: Matthew Date: Tue, 4 May 2010 16:34:30 +1200 Subject: [PATCH] Fixed log and replay file paths to save into user home dir. --- OpenRA.FileFormats/Support/Log.cs | 2 +- OpenRA.Game/Network/OrderManager.cs | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/OpenRA.FileFormats/Support/Log.cs b/OpenRA.FileFormats/Support/Log.cs index 55a259cf29..d0d6be195f 100755 --- a/OpenRA.FileFormats/Support/Log.cs +++ b/OpenRA.FileFormats/Support/Log.cs @@ -25,7 +25,7 @@ namespace OpenRA { public static class Log { - static StreamWriter writer = File.CreateText(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments) + Path.DirectorySeparatorChar + "openra.log.txt"); + static StreamWriter writer = File.CreateText(Environment.GetFolderPath(Environment.SpecialFolder.Personal) + Path.DirectorySeparatorChar + "openra.log.txt"); static Log() { diff --git a/OpenRA.Game/Network/OrderManager.cs b/OpenRA.Game/Network/OrderManager.cs index 0c18d922ff..a3e0397139 100755 --- a/OpenRA.Game/Network/OrderManager.cs +++ b/OpenRA.Game/Network/OrderManager.cs @@ -62,7 +62,10 @@ namespace OpenRA.Network public OrderManager( IConnection conn, string replayFilename ) : this( conn ) { - replaySaveFile = File.Create( replayFilename ); + string path = Environment.GetFolderPath(Environment.SpecialFolder.Personal) + + Path.DirectorySeparatorChar + ".openra"; + if (!Directory.Exists(path)) Directory.CreateDirectory(path); + replaySaveFile = File.Create( path + Path.DirectorySeparatorChar + replayFilename ); } public void IssueOrders( Order[] orders )