Migrate ordinary I/O from confined file helpers

This commit is contained in:
2026-09-01 17:51:37 +00:00
parent 0d57422b61
commit ba858cc997
34 changed files with 96 additions and 547 deletions

View File

@@ -57,7 +57,7 @@ func cacheIdentityEligible(req S3MaterializeRequest) bool {
}
func loadAudioCacheIdentity(path string) (audioCacheIdentity, bool, error) {
data, err := fileops.ReadRegularFile(path, 64*1024)
data, err := fileops.ReadFileBounded(path, 64*1024)
if os.IsNotExist(err) {
return audioCacheIdentity{}, false, nil
}
@@ -99,11 +99,7 @@ func materializeVerifiedCachedAudio(ctx context.Context, req S3MaterializeReques
return "", false, nil
}
relativePath, err := cacheRelativePath(req.CacheRoot, cachePath)
if err != nil {
return "", false, err
}
source, err := fileops.OpenConfinedRegularFile(req.CacheRoot, relativePath)
source, err := os.Open(cachePath)
if err != nil {
return "", false, nil
}