diff --git a/src/LibHac.Nand/DiscUtils.Fat/FileName.cs b/src/LibHac.Nand/DiscUtils.Fat/FileName.cs index 1e37965c..4a46f844 100644 --- a/src/LibHac.Nand/DiscUtils.Fat/FileName.cs +++ b/src/LibHac.Nand/DiscUtils.Fat/FileName.cs @@ -63,6 +63,11 @@ namespace DiscUtils.Fat _raw = new byte[11]; byte[] bytes = encoding.GetBytes(name.ToUpperInvariant()); + if (useLongName) + { + LongName = name; + } + int nameIdx = 0; int rawIdx = 0; while (nameIdx < bytes.Length && bytes[nameIdx] != '.' && rawIdx < _raw.Length) @@ -80,7 +85,6 @@ namespace DiscUtils.Fat { if(!useLongName) throw new ArgumentException("File name too long '" + name + "'", nameof(name)); - LongName = name; } if (rawIdx == 0) { diff --git a/src/LibHac.Nand/FatFileSystemProvider.cs b/src/LibHac.Nand/FatFileSystemProvider.cs index ed6634a9..9a1e9f9f 100644 --- a/src/LibHac.Nand/FatFileSystemProvider.cs +++ b/src/LibHac.Nand/FatFileSystemProvider.cs @@ -104,7 +104,7 @@ namespace LibHac.Nand internal static string ToDiscUtilsPath(string path) { - return path.Replace("/", @"\\"); + return path.Replace("/", @"\"); } } }