Compare commits

...
7 changed files with 30 additions and 16 deletions

No files matched your search

+1 -1
View File
@@ -64,7 +64,7 @@ require (
github.com/open-policy-agent/opa v1.12.3
github.com/orcaman/concurrent-map v1.0.0
github.com/owncloud/libre-graph-api-go v1.0.5-0.20260216101009-eeac018af245
github.com/owncloud/reva/v2 v2.0.0-20260304131727-ce3149532498
github.com/owncloud/reva/v2 v2.0.0-20260313004602-2207600dc2eb
github.com/pkg/errors v0.9.1
github.com/pkg/xattr v0.4.12
github.com/prometheus/client_golang v1.23.2
+2 -2
View File
@@ -742,8 +742,8 @@ github.com/orcaman/concurrent-map v1.0.0 h1:I/2A2XPCb4IuQWcQhBhSwGfiuybl/J0ev9HD
github.com/orcaman/concurrent-map v1.0.0/go.mod h1:Lu3tH6HLW3feq74c2GC+jIMS/K2CFcDWnWD9XkenwhI=
github.com/owncloud/libre-graph-api-go v1.0.5-0.20260216101009-eeac018af245 h1:JRidLTAKhnvyLMRtVtSF4lhBa0NSAOs6fof+d6JnKII=
github.com/owncloud/libre-graph-api-go v1.0.5-0.20260216101009-eeac018af245/go.mod h1:z61VMGAJRtR1nbgXWiNoCkxUXP1B3Je9rMuJbnGd+Og=
github.com/owncloud/reva/v2 v2.0.0-20260304131727-ce3149532498 h1:ozyudPff1XLWSeTDW4ajT1tCoSQf18cFQRxtLWFCNbk=
github.com/owncloud/reva/v2 v2.0.0-20260304131727-ce3149532498/go.mod h1:+rCy6oGYb2/qs5gmQa8y/pHARw634vB73MZGDY2SBIQ=
github.com/owncloud/reva/v2 v2.0.0-20260313004602-2207600dc2eb h1:BNEjpASeo8TwtvRKfbeB5xlL88XtoFUiWLjY4hKY44M=
github.com/owncloud/reva/v2 v2.0.0-20260313004602-2207600dc2eb/go.mod h1:+rCy6oGYb2/qs5gmQa8y/pHARw634vB73MZGDY2SBIQ=
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c h1:rp5dCmg/yLR3mgFuSOe4oEnDDmGLROTvMragMUXpTQw=
github.com/oxtoacart/bpool v0.0.0-20190530202638-03653db5a59c/go.mod h1:X07ZCGwUbLaax7L0S3Tw4hpejzu63ZrrQiUe6W0hcy0=
github.com/pablodz/inotifywaitgo v0.0.9 h1:njquRbBU7fuwIe5rEvtaniVBjwWzcpdUVptSgzFqZsw=
@@ -80,14 +80,27 @@ func (bs *Blobstore) Upload(node *node.Node, source string) error {
if err != nil {
return errors.Wrapf(err, "could not open blob '%s' for writing", dest)
}
defer func() {
if cerr := f.Close(); cerr != nil && err == nil {
err = errors.Wrapf(cerr, "could not close blob '%s'", dest)
}
}()
w := bufio.NewWriter(f)
_, err = w.ReadFrom(file)
if err != nil {
if _, err = w.ReadFrom(file); err != nil {
return errors.Wrapf(err, "could not write blob '%s'", dest)
}
return w.Flush()
if err = w.Flush(); err != nil {
return errors.Wrapf(err, "could not flush blob '%s'", dest)
}
// Ensure data is synced to disk before returning
if err = f.Sync(); err != nil {
return errors.Wrapf(err, "could not sync blob '%s' to disk", dest)
}
return nil
}
// Download retrieves a blob from the blobstore for reading
@@ -59,14 +59,17 @@ func (bs *Blobstore) Upload(node *node.Node, source string) error {
defer f.Close()
w := bufio.NewWriter(f)
_, err = w.ReadFrom(file)
if err != nil {
if _, err = w.ReadFrom(file); err != nil {
return errors.Wrapf(err, "could not write blob '%s'", node.InternalPath())
}
err = w.Flush()
if err != nil {
return err
if err = w.Flush(); err != nil {
return errors.Wrapf(err, "could not flush blob '%s'", node.InternalPath())
}
// Ensure data is synced to disk before returning
if err = f.Sync(); err != nil {
return errors.Wrapf(err, "could not sync blob '%s' to disk", node.InternalPath())
}
if fi != nil {
@@ -390,9 +390,8 @@ func (fs *Decomposedfs) Postprocessing(ch <-chan events.Event) {
ResourceId: &provider.ResourceId{
StorageId: session.ProviderID(),
SpaceId: session.SpaceID(),
OpaqueId: session.SpaceID(),
OpaqueId: session.NodeID(),
},
Path: utils.MakeRelativePath(filepath.Join(session.Dir(), session.Filename())),
},
ResourceID: &provider.ResourceId{
StorageId: session.ProviderID(),
@@ -101,9 +101,8 @@ func (fs *Decomposedfs) Upload(ctx context.Context, req storage.UploadRequest, u
ResourceId: &provider.ResourceId{
StorageId: session.ProviderID(),
SpaceId: session.SpaceID(),
OpaqueId: session.SpaceID(),
OpaqueId: session.NodeID(),
},
Path: utils.MakeRelativePath(filepath.Join(session.Dir(), session.Filename())),
}
executant := session.Executant()
uff(session.SpaceOwner(), &executant, uploadRef)
+1 -1
View File
@@ -1316,7 +1316,7 @@ github.com/orcaman/concurrent-map
# github.com/owncloud/libre-graph-api-go v1.0.5-0.20260216101009-eeac018af245
## explicit; go 1.18
github.com/owncloud/libre-graph-api-go
# github.com/owncloud/reva/v2 v2.0.0-20260304131727-ce3149532498
# github.com/owncloud/reva/v2 v2.0.0-20260313004602-2207600dc2eb
## explicit; go 1.24.0
github.com/owncloud/reva/v2/cmd/revad/internal/grace
github.com/owncloud/reva/v2/cmd/revad/runtime