Make script paths in .luases relative to .luases path
Restore behavior before 99dc0e03df
This commit is contained in:
parent
df4df517b8
commit
01ab9416b5
|
@ -2,6 +2,7 @@
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
using BizHawk.Common.PathExtensions;
|
||||||
|
|
||||||
namespace BizHawk.Client.Common
|
namespace BizHawk.Client.Common
|
||||||
{
|
{
|
||||||
|
@ -107,6 +108,7 @@ namespace BizHawk.Client.Common
|
||||||
{
|
{
|
||||||
using var sw = new StreamWriter(path);
|
using var sw = new StreamWriter(path);
|
||||||
var sb = new StringBuilder();
|
var sb = new StringBuilder();
|
||||||
|
var saveDirectory = Path.GetDirectoryName(Path.GetFullPath(path));
|
||||||
foreach (var file in this)
|
foreach (var file in this)
|
||||||
{
|
{
|
||||||
if (file.IsSeparator)
|
if (file.IsSeparator)
|
||||||
|
@ -118,7 +120,7 @@ namespace BizHawk.Client.Common
|
||||||
sb
|
sb
|
||||||
.Append(file.Enabled ? "1" : "0")
|
.Append(file.Enabled ? "1" : "0")
|
||||||
.Append(' ')
|
.Append(' ')
|
||||||
.Append(file.Path)
|
.Append(file.Path.MakeRelativeTo(saveDirectory))
|
||||||
.AppendLine();
|
.AppendLine();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue