[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

View File

@@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Reflection;
using System.Xml;
using SabreTools.Helper.Data;
@@ -30,7 +31,7 @@ namespace SabreTools.Helper.Skippers
public string SourceFile;
// Local paths
public const string LocalPath = "Skippers";
public static string LocalPath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase), "Skippers") + Path.DirectorySeparatorChar;
// Header skippers represented by a list of skipper objects
private static List<Skipper> _list;