Merge remote-tracking branch 'origin/aqua/safe-filename-collide-dotdot' into aqua/store-filename-ipa

This commit is contained in:
Aqua 2026-11-07 09:54:00 +00:00
commit b906d98ed5
3 changed files with 11 additions and 3 deletions

View file

@ -38,6 +38,12 @@ public static class StoreFileName
return safe;
}
// "nul.x-<hash>" still has the device stem "nul"; the underscore moves the whole name off it.
if (IsDeviceStem(safe))
{
safe = "_" + safe;
}
var hash = Convert.ToHexString(SHA256.HashData(Encoding.UTF8.GetBytes(id)))[..HashLength].ToLowerInvariant();
return $"{safe}-{hash}";
}