StoreFileName: device stems no longer survive as the stem; IpaTrialWorker paths use it
"nul.x" was rewritten to "nul.x-<hash>", whose stem is still NUL on Windows; rewritten device names now get a leading underscore, and the test asserts the stem is not reserved. IpaTrialWorker candidate directories go through StoreFileName.From; its remaining SafeName only slugs uuid-suffixed record ids. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
de754b5b8c
commit
afd0cc9ec3
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