feat: add teambition driver

This commit is contained in:
Noah Hsu
2022-09-02 18:24:14 +08:00
parent bc155af255
commit 0f2425ce53
22 changed files with 523 additions and 30 deletions

View File

@ -84,7 +84,7 @@ func Get(ctx context.Context, storage driver.Driver, path string) (model.Obj, er
}
// is root folder
if r, ok := storage.GetAddition().(driver.IRootFolderId); ok && utils.PathEqual(path, "/") {
return model.Object{
return &model.Object{
ID: r.GetRootFolderId(),
Name: "root",
Size: 0,
@ -93,7 +93,7 @@ func Get(ctx context.Context, storage driver.Driver, path string) (model.Obj, er
}, nil
}
if r, ok := storage.GetAddition().(driver.IRootFolderPath); ok && isRoot(path, r.GetRootFolderPath()) {
return model.Object{
return &model.Object{
ID: r.GetRootFolderPath(),
Name: "root",
Size: 0,