mirror of
https://github.com/haiwen/seafile-server.git
synced 2025-04-28 03:20:10 +00:00
Only use tmpfiles dir for blocks (#730)
Co-authored-by: 杨赫然 <heran.yang@seafile.com>
This commit is contained in:
parent
db8c637c68
commit
de62852244
@ -3,7 +3,6 @@ package objstore
|
||||
|
||||
import (
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"path"
|
||||
)
|
||||
@ -57,7 +56,11 @@ func (b *fsBackend) write(repoID string, objID string, r io.Reader, sync bool) e
|
||||
return err
|
||||
}
|
||||
|
||||
tFile, err := ioutil.TempFile(b.tmpDir, objID)
|
||||
tmpDir := b.tmpDir
|
||||
if b.objType != "blocks" {
|
||||
tmpDir = parentDir
|
||||
}
|
||||
tFile, err := os.CreateTemp(tmpDir, objID+".*")
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user