[Logger, Skipper] Make sure log and skipper folders are in the right place

This commit is contained in:
Matt Nadareski
2017-03-29 11:25:31 -07:00
parent 51392f8c93
commit 65b2b187d6
2 changed files with 14 additions and 3 deletions

View File

@@ -1,8 +1,18 @@
using System;
using System.IO;
using System.Reflection;
using SabreTools.Helper.Data;
#if MONO
using System.IO;
#else
using Alphaleonis.Win32.Filesystem;
using FileAccess = System.IO.FileAccess;
using FileMode = System.IO.FileMode;
using StreamWriter = System.IO.StreamWriter;
#endif
namespace SabreTools.Helper
{
/// <summary>
@@ -23,7 +33,7 @@ namespace SabreTools.Helper
private StreamWriter _log;
// Private required variables
private string _basepath = "logs" + Path.DirectorySeparatorChar;
private string _basepath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase), "logs") + Path.DirectorySeparatorChar;
/// <summary>
/// Initialize a console-only logger object