mirror of
https://github.com/restic/rest-server.git
synced 2025-10-19 07:33:21 +00:00
Create data hash folders during startup, too
So, that we are not constantly trying to mkdir() what is already there. This is a small performance improvement.
This commit is contained in:
parent
fe8ce643aa
commit
65c1af31fe
2 changed files with 4 additions and 1 deletions
|
@ -197,7 +197,6 @@ func SaveBlob(c *Context) http.HandlerFunc {
|
|||
}
|
||||
|
||||
if dir == "data" {
|
||||
os.MkdirAll(filepath.Join(c.path, dir, name[:2]), 0700)
|
||||
name = filepath.Join(name[:2], name)
|
||||
}
|
||||
path := filepath.Join(c.path, dir, name)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue