Provided support for changing the location of the projects save data root.

This commit is contained in:
Scionwest_cp 2012-03-10 19:15:43 -08:00
parent f5cf0c1f6a
commit 11b2e73f35
5 changed files with 62 additions and 11 deletions

View file

@ -4,6 +4,7 @@ using System.Linq;
using System.Text;
using System.Xml.Linq;
using System.Reflection;
using System.IO;
using MudEngine.GameScripts;
using MudEngine.Core;
@ -41,6 +42,11 @@ namespace MudEngine.DAL
public Boolean Save(String filename)
{
if (!Directory.Exists(Path.GetDirectoryName(filename)))
{
Directory.CreateDirectory(Path.GetDirectoryName(filename));
}
try
{
this.SaveData.Save(filename);