mirror of
https://github.com/restic/rest-server.git
synced 2025-10-19 23:53:20 +00:00
removed dependency to the backend
This commit is contained in:
parent
a982e279f3
commit
7972b1330b
1 changed files with 6 additions and 7 deletions
13
server.go
13
server.go
|
@ -6,8 +6,6 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
|
||||||
"github.com/restic/restic/backend"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -23,12 +21,13 @@ func main() {
|
||||||
|
|
||||||
// Create all the necessary subdirectories
|
// Create all the necessary subdirectories
|
||||||
dirs := []string{
|
dirs := []string{
|
||||||
backend.Paths.Data,
|
"data",
|
||||||
backend.Paths.Snapshots,
|
"snapshots",
|
||||||
backend.Paths.Index,
|
"index",
|
||||||
backend.Paths.Locks,
|
"locks",
|
||||||
backend.Paths.Keys,
|
"keys",
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, d := range dirs {
|
for _, d := range dirs {
|
||||||
os.MkdirAll(filepath.Join(*path, d), backend.Modes.Dir)
|
os.MkdirAll(filepath.Join(*path, d), backend.Modes.Dir)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue