Browse Source

filer mongodb delete

pull/1280/head
bukton 5 years ago
parent
commit
6234ea441b
  1. 6
      weed/filer2/mongodb/mongodb_store.go

6
weed/filer2/mongodb/mongodb_store.go

@ -110,6 +110,12 @@ func (store *MongodbStore) FindEntry(ctx context.Context, fullpath util.FullPath
func (store *MongodbStore) DeleteEntry(ctx context.Context, fullpath util.FullPath) error {
where := bson.M{"directory": fullpath}
_, err := store.connect.Database(store.database).Collection(store.collectionName).DeleteOne(ctx, where)
if err != nil {
return fmt.Errorf("delete %s : %v", fullpath, err)
}
return nil
}

Loading…
Cancel
Save