Refactor AaxDecrypter

This commit is contained in:
Michael Bucari-Tovo 2023-01-24 22:25:19 -07:00
parent 4d6c742ae9
commit 25b37c6266
19 changed files with 363 additions and 932 deletions

View file

@ -5,7 +5,7 @@
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Dinah.Core" Version="7.2.0.1" />
<PackageReference Include="Dinah.Core" Version="7.2.1.1" />
<PackageReference Include="Polly" Version="7.2.3" />
</ItemGroup>

View file

@ -40,6 +40,7 @@ namespace FileManager
}
}
[JsonConstructor]
private LongPath(string path)
{
if (IsWindows && path.Length > MaxPathLength)
@ -56,9 +57,8 @@ namespace FileManager
///a choice made by the linux kernel. As best as I can tell, pretty
//much everyone uses UTF-8.
public static int GetFilesystemStringLength(StringBuilder filename)
=> LongPath.IsWindows ?
filename.Length
: Encoding.UTF8.GetByteCount(filename.ToString());
=> IsWindows ? filename.Length
: Encoding.UTF8.GetByteCount(filename.ToString());
public static implicit operator LongPath(string path)
{