mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[Logger, Skipper] Make sure log and skipper folders are in the right place
This commit is contained in:
@@ -1,8 +1,18 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.IO;
|
using System.Reflection;
|
||||||
|
|
||||||
using SabreTools.Helper.Data;
|
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
|
namespace SabreTools.Helper
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -23,7 +33,7 @@ namespace SabreTools.Helper
|
|||||||
private StreamWriter _log;
|
private StreamWriter _log;
|
||||||
|
|
||||||
// Private required variables
|
// Private required variables
|
||||||
private string _basepath = "logs" + Path.DirectorySeparatorChar;
|
private string _basepath = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().GetName().CodeBase), "logs") + Path.DirectorySeparatorChar;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Initialize a console-only logger object
|
/// Initialize a console-only logger object
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Globalization;
|
using System.Globalization;
|
||||||
|
using System.Reflection;
|
||||||
using System.Xml;
|
using System.Xml;
|
||||||
|
|
||||||
using SabreTools.Helper.Data;
|
using SabreTools.Helper.Data;
|
||||||
@@ -30,7 +31,7 @@ namespace SabreTools.Helper.Skippers
|
|||||||
public string SourceFile;
|
public string SourceFile;
|
||||||
|
|
||||||
// Local paths
|
// 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
|
// Header skippers represented by a list of skipper objects
|
||||||
private static List<Skipper> _list;
|
private static List<Skipper> _list;
|
||||||
|
|||||||
Reference in New Issue
Block a user