1
0
Fork 0
mirror of https://code.forgejo.org/forgejo/runner.git synced 2025-09-15 18:57:01 +00:00

fix(cache-server): use consistent uint64

This commit is contained in:
Michael Kriese 2024-11-22 01:01:12 +01:00
parent d89433fe3d
commit d8376ed890
2 changed files with 10 additions and 10 deletions

View file

@ -31,7 +31,7 @@ func (s *Storage) Exist(id uint64) (bool, error) {
return true, nil
}
func (s *Storage) Write(id uint64, offset int64, reader io.Reader) error {
func (s *Storage) Write(id uint64, offset uint64, reader io.Reader) error {
name := s.tempName(id, offset)
if err := os.MkdirAll(filepath.Dir(name), 0o755); err != nil {
return err
@ -110,7 +110,7 @@ func (s *Storage) tempDir(id uint64) string {
return filepath.Join(s.rootDir, "tmp", fmt.Sprint(id))
}
func (s *Storage) tempName(id uint64, offset int64) string {
func (s *Storage) tempName(id uint64, offset uint64) string {
return filepath.Join(s.tempDir(id), fmt.Sprintf("%016x", offset))
}