mirror of
https://github.com/SabreTools/SabreTools.Serialization.git
synced 2026-04-05 22:01:33 +00:00
Slight simplification to GetDepotPath
This commit is contained in:
@@ -29,12 +29,12 @@ namespace SabreTools.Metadata.Tools
|
||||
/// <returns>Subfolder path for the given hash</returns>
|
||||
public static string? GetDepotPath(string? hash, int depth)
|
||||
{
|
||||
// If the hash is null or empty, then we return null
|
||||
if (string.IsNullOrEmpty(hash))
|
||||
// If the hash is null, then we return null
|
||||
if (hash is null)
|
||||
return null;
|
||||
|
||||
// If the hash isn't the right size, then we return null
|
||||
if (hash!.Length != HashType.SHA1.ZeroString.Length)
|
||||
if (hash.Length != HashType.SHA1.ZeroString.Length)
|
||||
return null;
|
||||
|
||||
// Cap the depth between 0 and 20, for now
|
||||
|
||||
Reference in New Issue
Block a user