add back substring usage

This commit is contained in:
Adam Hathcock
2026-02-09 16:16:32 +00:00
parent ed52ed1e73
commit 4475c2af73

View File

@@ -50,7 +50,7 @@ internal sealed partial class LzwFilePart : FilePart
// Strip .Z extension if present
if (fileName.EndsWith(".Z", System.StringComparison.OrdinalIgnoreCase))
{
return fileName[..^2];
return fileName.Substring(0, fileName.Length - 2);
}
return fileName;
}