mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-08 20:40:16 -05:00
drop /meta mount prefix
Signed-off-by: Jörn Friedrich Dreyer <jfd@butonic.de>
This commit is contained in:
@@ -162,7 +162,7 @@ func (idx *Autoincrement) Remove(id string, v string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
deletePath := path.Join("/meta", idx.indexRootDir, v)
|
||||
deletePath := path.Join("/", idx.indexRootDir, v)
|
||||
resp, err := idx.storageProvider.Delete(ctx, &provider.DeleteRequest{
|
||||
Ref: &provider.Reference{
|
||||
Path: deletePath,
|
||||
@@ -203,7 +203,7 @@ func (idx *Autoincrement) Search(pattern string) ([]string, error) {
|
||||
|
||||
res, err := idx.storageProvider.ListContainer(ctx, &provider.ListContainerRequest{
|
||||
Ref: &provider.Reference{
|
||||
Path: path.Join("/meta", idx.indexRootDir),
|
||||
Path: path.Join("/", idx.indexRootDir),
|
||||
},
|
||||
})
|
||||
|
||||
@@ -301,7 +301,11 @@ func (idx *Autoincrement) next() (int, error) {
|
||||
|
||||
res, err := idx.storageProvider.ListContainer(ctx, &provider.ListContainerRequest{
|
||||
Ref: &provider.Reference{
|
||||
<<<<<<< HEAD
|
||||
Path: path.Join("/meta", idx.indexRootDir), //TODO:
|
||||
=======
|
||||
Path: path.Join("/", idx.indexRootDir),
|
||||
>>>>>>> 7a5fb4c2e (drop /meta mount prefix)
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ import (
|
||||
func deleteIndexRoot(ctx context.Context, storageProvider provider.ProviderAPIClient, indexRootDir string) error {
|
||||
res, err := storageProvider.Delete(ctx, &provider.DeleteRequest{
|
||||
Ref: &provider.Reference{
|
||||
Path: path.Join("/meta", indexRootDir),
|
||||
Path: path.Join("/", indexRootDir),
|
||||
},
|
||||
})
|
||||
if err != nil {
|
||||
|
||||
@@ -119,7 +119,7 @@ func (idx *NonUnique) Lookup(v string) ([]string, error) {
|
||||
|
||||
res, err := idx.storageProvider.ListContainer(ctx, &provider.ListContainerRequest{
|
||||
Ref: &provider.Reference{
|
||||
Path: path.Join("/meta", idx.indexRootDir, v),
|
||||
Path: path.Join("/", idx.indexRootDir, v),
|
||||
},
|
||||
})
|
||||
|
||||
@@ -172,7 +172,7 @@ func (idx *NonUnique) Remove(id string, v string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
deletePath := path.Join("/meta", idx.indexRootDir, v, id)
|
||||
deletePath := path.Join("/", idx.indexRootDir, v, id)
|
||||
resp, err := idx.storageProvider.Delete(ctx, &provider.DeleteRequest{
|
||||
Ref: &provider.Reference{
|
||||
Path: deletePath,
|
||||
@@ -187,7 +187,7 @@ func (idx *NonUnique) Remove(id string, v string) error {
|
||||
return &idxerrs.NotFoundErr{TypeName: idx.typeName, Key: idx.indexBy, Value: v}
|
||||
}
|
||||
|
||||
toStat := path.Join("/meta", idx.indexRootDir, v)
|
||||
toStat := path.Join("/", idx.indexRootDir, v)
|
||||
lcResp, err := idx.storageProvider.ListContainer(ctx, &provider.ListContainerRequest{
|
||||
Ref: &provider.Reference{
|
||||
Path: toStat,
|
||||
@@ -198,7 +198,7 @@ func (idx *NonUnique) Remove(id string, v string) error {
|
||||
}
|
||||
|
||||
if len(lcResp.Infos) == 0 {
|
||||
deletePath = path.Join("/meta", idx.indexRootDir, v)
|
||||
deletePath = path.Join("/", idx.indexRootDir, v)
|
||||
_, err := idx.storageProvider.Delete(ctx, &provider.DeleteRequest{
|
||||
Ref: &provider.Reference{
|
||||
Path: deletePath,
|
||||
@@ -245,7 +245,7 @@ func (idx *NonUnique) Search(pattern string) ([]string, error) {
|
||||
matches := make([]string, 0)
|
||||
res, err := idx.storageProvider.ListContainer(ctx, &provider.ListContainerRequest{
|
||||
Ref: &provider.Reference{
|
||||
Path: path.Join("/meta", idx.indexRootDir),
|
||||
Path: path.Join("/", idx.indexRootDir),
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ package cs3
|
||||
// sut := NewNonUniqueIndexWithOptions(
|
||||
// option.WithTypeName(GetTypeFQN(User{})),
|
||||
// option.WithIndexBy("UserName"),
|
||||
// option.WithFilesDir(path.Join(cfg.Repo.Disk.Path, "/meta")),
|
||||
// option.WithFilesDir(path.Join(cfg.Repo.Disk.Path, "/")),
|
||||
// option.WithDataDir(cfg.Repo.Disk.Path),
|
||||
// option.WithDataURL(cfg.Repo.CS3.DataURL),
|
||||
// option.WithDataPrefix(cfg.Repo.CS3.DataPrefix),
|
||||
|
||||
@@ -162,7 +162,12 @@ func (idx *Unique) Remove(id string, v string) error {
|
||||
return err
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
deletePath := path.Join("/meta", idx.indexRootDir, v)
|
||||
=======
|
||||
deletePath := path.Join("/", idx.indexRootDir, v)
|
||||
ctx = metadata.AppendToOutgoingContext(ctx, revactx.TokenHeader, t)
|
||||
>>>>>>> 7a5fb4c2e (drop /meta mount prefix)
|
||||
resp, err := idx.storageProvider.Delete(ctx, &provider.DeleteRequest{
|
||||
Ref: &provider.Reference{
|
||||
Path: deletePath,
|
||||
@@ -212,7 +217,7 @@ func (idx *Unique) Search(pattern string) ([]string, error) {
|
||||
|
||||
res, err := idx.storageProvider.ListContainer(ctx, &provider.ListContainerRequest{
|
||||
Ref: &provider.Reference{
|
||||
Path: path.Join("/meta", idx.indexRootDir),
|
||||
Path: path.Join("/", idx.indexRootDir),
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ package cs3
|
||||
// sut := NewUniqueIndexWithOptions(
|
||||
// option.WithTypeName(GetTypeFQN(User{})),
|
||||
// option.WithIndexBy("UserName"),
|
||||
// option.WithFilesDir(path.Join(cfg.Repo.Disk.Path, "/meta")),
|
||||
// option.WithFilesDir(path.Join(cfg.Repo.Disk.Path, "/")),
|
||||
// option.WithDataDir(cfg.Repo.Disk.Path),
|
||||
// option.WithDataURL(cfg.Repo.CS3.DataURL),
|
||||
// option.WithDataPrefix(cfg.Repo.CS3.DataPrefix),
|
||||
@@ -82,7 +82,7 @@ package cs3
|
||||
// sut := NewUniqueIndexWithOptions(
|
||||
// option.WithTypeName(GetTypeFQN(User{})),
|
||||
// option.WithIndexBy("UserName"),
|
||||
// option.WithFilesDir(path.Join(cfg.Repo.Disk.Path, "/meta")),
|
||||
// option.WithFilesDir(path.Join(cfg.Repo.Disk.Path, "/")),
|
||||
// option.WithDataDir(cfg.Repo.Disk.Path),
|
||||
// option.WithDataURL(cfg.Repo.CS3.DataURL),
|
||||
// option.WithDataPrefix(cfg.Repo.CS3.DataPrefix),
|
||||
|
||||
Reference in New Issue
Block a user