Store maps in new subdir "maps"

This commit is contained in:
Alexander Neumann
2014-11-23 22:26:01 +01:00
parent b1923063fe
commit 33ce4e33aa
9 changed files with 57 additions and 12 deletions
+1
View File
@@ -10,6 +10,7 @@ const (
Lock = "lock"
Snapshot = "snapshot"
Tree = "tree"
Map = "map"
)
const (
+4
View File
@@ -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:
+1 -1
View File
@@ -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)
+2
View File
@@ -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: