Merge remote-tracking branch 'origin/aqua/safe-filename-collide-dotdot' into aqua/store-filename-ipa
This commit is contained in:
commit
b906d98ed5
3 changed files with 11 additions and 3 deletions
|
|
@ -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}";
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue