mirror of
https://github.com/xivdev/Penumbra.git
synced 2026-02-20 06:47:46 +01:00
Use CiByteString for anything path-related.
This commit is contained in:
parent
9d128a4d83
commit
d247f83e1d
42 changed files with 163 additions and 124 deletions
|
|
@ -270,7 +270,7 @@ public partial class ModCreator(
|
|||
public MultiSubMod CreateSubMod(DirectoryInfo baseFolder, DirectoryInfo optionFolder, OptionList option, ModPriority priority)
|
||||
{
|
||||
var list = optionFolder.EnumerateNonHiddenFiles()
|
||||
.Select(f => (Utf8GamePath.FromFile(f, optionFolder, out var gamePath, true), gamePath, new FullPath(f)))
|
||||
.Select(f => (Utf8GamePath.FromFile(f, optionFolder, out var gamePath), gamePath, new FullPath(f)))
|
||||
.Where(t => t.Item1);
|
||||
|
||||
var mod = MultiSubMod.WithoutGroup(option.Name, option.Description, priority);
|
||||
|
|
@ -291,7 +291,7 @@ public partial class ModCreator(
|
|||
ReloadMod(mod, false, out _);
|
||||
foreach (var file in mod.FindUnusedFiles())
|
||||
{
|
||||
if (Utf8GamePath.FromFile(new FileInfo(file.FullName), directory, out var gamePath, true))
|
||||
if (Utf8GamePath.FromFile(new FileInfo(file.FullName), directory, out var gamePath))
|
||||
mod.Default.Files.TryAdd(gamePath, file);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ public static class SubMod
|
|||
if (files != null)
|
||||
foreach (var property in files.Properties())
|
||||
{
|
||||
if (Utf8GamePath.FromString(property.Name, out var p, true))
|
||||
if (Utf8GamePath.FromString(property.Name, out var p))
|
||||
data.Files.TryAdd(p, new FullPath(basePath, property.Value.ToObject<Utf8RelPath>()));
|
||||
}
|
||||
|
||||
|
|
@ -60,7 +60,7 @@ public static class SubMod
|
|||
if (swaps != null)
|
||||
foreach (var property in swaps.Properties())
|
||||
{
|
||||
if (Utf8GamePath.FromString(property.Name, out var p, true))
|
||||
if (Utf8GamePath.FromString(property.Name, out var p))
|
||||
data.FileSwaps.TryAdd(p, new FullPath(property.Value.ToObject<string>()!));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue