mirror of
https://github.com/restic/restic.git
synced 2026-07-09 16:55:10 +00:00
Store maps in new subdir "maps"
This commit is contained in:
@@ -10,6 +10,7 @@ const (
|
||||
Lock = "lock"
|
||||
Snapshot = "snapshot"
|
||||
Tree = "tree"
|
||||
Map = "map"
|
||||
)
|
||||
|
||||
const (
|
||||
|
||||
@@ -17,6 +17,7 @@ const (
|
||||
dataPath = "data"
|
||||
snapshotPath = "snapshots"
|
||||
treePath = "trees"
|
||||
mapPath = "maps"
|
||||
lockPath = "locks"
|
||||
keyPath = "keys"
|
||||
tempPath = "tmp"
|
||||
@@ -86,6 +87,7 @@ func CreateLocal(dir string) (*Local, error) {
|
||||
filepath.Join(dir, dataPath),
|
||||
filepath.Join(dir, snapshotPath),
|
||||
filepath.Join(dir, treePath),
|
||||
filepath.Join(dir, mapPath),
|
||||
filepath.Join(dir, lockPath),
|
||||
filepath.Join(dir, keyPath),
|
||||
filepath.Join(dir, tempPath),
|
||||
@@ -158,6 +160,8 @@ func (b *Local) dir(t Type) string {
|
||||
n = snapshotPath
|
||||
case Tree:
|
||||
n = treePath
|
||||
case Map:
|
||||
n = mapPath
|
||||
case Lock:
|
||||
n = lockPath
|
||||
case Key:
|
||||
|
||||
@@ -45,7 +45,7 @@ func teardownBackend(t *testing.T, b *backend.Local) {
|
||||
}
|
||||
|
||||
func testBackend(b backend.Server, t *testing.T) {
|
||||
for _, tpe := range []backend.Type{backend.Data, backend.Key, backend.Lock, backend.Snapshot, backend.Tree} {
|
||||
for _, tpe := range []backend.Type{backend.Data, backend.Key, backend.Lock, backend.Snapshot, backend.Tree, backend.Map} {
|
||||
// detect non-existing files
|
||||
for _, test := range TestStrings {
|
||||
id, err := backend.ParseID(test.id)
|
||||
|
||||
@@ -238,6 +238,8 @@ func (r *SFTP) dir(t Type) string {
|
||||
n = snapshotPath
|
||||
case Tree:
|
||||
n = treePath
|
||||
case Map:
|
||||
n = mapPath
|
||||
case Lock:
|
||||
n = lockPath
|
||||
case Key:
|
||||
|
||||
Reference in New Issue
Block a user