Bump reva
This commit is contained in:
Generated
Vendored
-4
@@ -75,10 +75,6 @@ func (c *Config) Init() {
|
||||
c.ProductVersion = "10.0.11"
|
||||
}
|
||||
|
||||
if c.Edition == "" {
|
||||
c.Edition = "community"
|
||||
}
|
||||
|
||||
if c.NameValidation.InvalidChars == nil {
|
||||
c.NameValidation.InvalidChars = []string{"\f", "\r", "\n", "\\"}
|
||||
}
|
||||
|
||||
Generated
Vendored
+2
-2
@@ -70,7 +70,7 @@ func (h *Handler) Init(c *config.Config) {
|
||||
h.c.Capabilities.Core.Status.VersionString = "10.0.11" // TODO make build determined
|
||||
}
|
||||
if h.c.Capabilities.Core.Status.Edition == "" {
|
||||
h.c.Capabilities.Core.Status.Edition = "community" // TODO make build determined
|
||||
h.c.Capabilities.Core.Status.Edition = "" // TODO make build determined
|
||||
}
|
||||
if h.c.Capabilities.Core.Status.ProductName == "" {
|
||||
h.c.Capabilities.Core.Status.ProductName = "reva" // TODO make build determined
|
||||
@@ -220,7 +220,7 @@ func (h *Handler) Init(c *config.Config) {
|
||||
Minor: 0,
|
||||
Micro: 11,
|
||||
String: "10.0.11",
|
||||
Edition: "community",
|
||||
Edition: "",
|
||||
Product: "reva",
|
||||
ProductVersion: "",
|
||||
}
|
||||
|
||||
+8
@@ -406,6 +406,14 @@ func (lu *Lookup) GenerateSpaceID(spaceType string, owner *user.User) (string, e
|
||||
}
|
||||
}
|
||||
|
||||
func (lu *Lookup) PurgeNode(n *node.Node) error {
|
||||
rerr := os.RemoveAll(n.InternalPath())
|
||||
if cerr := lu.IDCache.Delete(context.Background(), n.SpaceID, n.ID); cerr != nil {
|
||||
return cerr
|
||||
}
|
||||
return rerr
|
||||
}
|
||||
|
||||
// TimeManager returns the time manager
|
||||
func (lu *Lookup) TimeManager() node.TimeManager {
|
||||
return lu.tm
|
||||
|
||||
Generated
Vendored
+12
@@ -34,6 +34,7 @@ import (
|
||||
"github.com/opencloud-eu/reva/v2/pkg/storage/pkg/decomposedfs/metadata/prefixes"
|
||||
"github.com/opencloud-eu/reva/v2/pkg/storage/pkg/decomposedfs/node"
|
||||
"github.com/opencloud-eu/reva/v2/pkg/storage/pkg/decomposedfs/options"
|
||||
"github.com/opencloud-eu/reva/v2/pkg/utils"
|
||||
"github.com/pkg/errors"
|
||||
"github.com/rogpeppe/go-internal/lockedfile"
|
||||
"go.opentelemetry.io/otel"
|
||||
@@ -349,6 +350,17 @@ func (lu *Lookup) CopyMetadataWithSourceLock(ctx context.Context, sourceNode, ta
|
||||
return lu.MetadataBackend().SetMultiple(ctx, targetNode, newAttrs, acquireTargetLock)
|
||||
}
|
||||
|
||||
func (lu *Lookup) PurgeNode(n *node.Node) error {
|
||||
// remove node
|
||||
if err := utils.RemoveItem(n.InternalPath()); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// remove child entry in parent
|
||||
src := filepath.Join(n.ParentPath(), n.Name)
|
||||
return os.Remove(src)
|
||||
}
|
||||
|
||||
// TimeManager returns the time manager
|
||||
func (lu *Lookup) TimeManager() node.TimeManager {
|
||||
return lu.tm
|
||||
|
||||
+3
-9
@@ -29,7 +29,6 @@ import (
|
||||
"hash/adler32"
|
||||
"io"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
@@ -165,6 +164,8 @@ type PathLookup interface {
|
||||
ReadBlobIDAndSizeAttr(ctx context.Context, n metadata.MetadataNode, attrs Attributes) (string, int64, error)
|
||||
CopyMetadataWithSourceLock(ctx context.Context, sourceNode, targetNode metadata.MetadataNode, filter func(attributeName string, value []byte) (newValue []byte, copy bool), lockedSource *lockedfile.File, acquireTargetLock bool) (err error)
|
||||
CopyMetadata(ctx context.Context, sourceNode, targetNode metadata.MetadataNode, filter func(attributeName string, value []byte) (newValue []byte, copy bool), acquireTargetLock bool) (err error)
|
||||
|
||||
PurgeNode(n *Node) error
|
||||
}
|
||||
|
||||
type IDCacher interface {
|
||||
@@ -1195,14 +1196,7 @@ func (n *Node) DeleteGrant(ctx context.Context, g *provider.Grant, acquireLock b
|
||||
|
||||
// Purge removes a node from disk. It does not move it to the trash
|
||||
func (n *Node) Purge(ctx context.Context) error {
|
||||
// remove node
|
||||
if err := utils.RemoveItem(n.InternalPath()); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// remove child entry in parent
|
||||
src := filepath.Join(n.ParentPath(), n.Name)
|
||||
return os.Remove(src)
|
||||
return n.lu.PurgeNode(n)
|
||||
}
|
||||
|
||||
// ListGrants lists all grants of the current node.
|
||||
|
||||
Reference in New Issue
Block a user