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:
parent
d89433fe3d
commit
d8376ed890
2 changed files with 10 additions and 10 deletions
|
@ -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))
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue