[Enhancement] support fix for remote files with command fix (#6961)

This commit is contained in:
chalet
2025-07-10 21:13:16 +08:00
committed by GitHub
parent c04b7b411c
commit 804979d68b
2 changed files with 17 additions and 3 deletions

View File

@@ -129,6 +129,11 @@ type S3BackendStorageFile struct {
}
func (s3backendStorageFile S3BackendStorageFile) ReadAt(p []byte, off int64) (n int, err error) {
datSize, _, _ := s3backendStorageFile.GetStat()
if datSize > 0 && off >= datSize {
return 0, io.EOF
}
bytesRange := fmt.Sprintf("bytes=%d-%d", off, off+int64(len(p))-1)