Skip to content

Commit

Permalink
proper naming
Browse files Browse the repository at this point in the history
Signed-off-by: jkoberg <jkoberg@owncloud.com>
  • Loading branch information
kobergj committed Jun 28, 2022
1 parent 56440d5 commit a9e3435
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions pkg/storage/utils/decomposedfs/decomposedfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -504,15 +504,15 @@ func (fs *Decomposedfs) GetMD(ctx context.Context, ref *provider.Reference, mdKe
return
}

isprocessed := node.IsProcessed()
if !isprocessed && !node.Exists {
isprocessing := node.IsProcessing()
if !isprocessing && !node.Exists {
err = errtypes.NotFound(filepath.Join(node.ParentID, node.Name))
return
}

rp, err := fs.p.AssemblePermissions(ctx, node)
switch {
case isprocessed:
case isprocessing:
// FIXME: how to check permissions for files while processing?
// the node is empty and holds no further information
case err != nil:
Expand Down
6 changes: 3 additions & 3 deletions pkg/storage/utils/decomposedfs/node/node.go
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ func (n *Node) AsResourceInfo(ctx context.Context, rp *provider.ResourcePermissi
ParentId: parentID,
}

if n.IsProcessed() {
if n.IsProcessing() {
ri.Opaque = utils.AppendPlainToOpaque(ri.Opaque, "status", "processing")
return ri, nil
}
Expand Down Expand Up @@ -1139,8 +1139,8 @@ func (n *Node) UnmarkProcessing() error {
return n.RemoveMetadata("user.ocis.nodestatus")
}

// IsProcessed returns true if the node is currently being processed
func (n *Node) IsProcessed() bool {
// IsProcessing returns true if the node is currently being processed
func (n *Node) IsProcessing() bool {
v, err := n.GetMetadata("user.ocis.nodestatus")
return err == nil && v == "processing"
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/storage/utils/decomposedfs/options/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ type Options struct {

// PostprocessingOptions defines the available options for postprocessing
type PostprocessingOptions struct {
ASyncFileUploads bool `mapstructure:"asyncfileuploads"`
AsyncFileUploads bool `mapstructure:"asyncfileuploads"`

DelayProcessing time.Duration `mapstructure:"delayprocessing"` // for testing purposes, or if you want to annoy your users
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/storage/utils/decomposedfs/upload/postprocessing.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (

func configurePostprocessing(upload *Upload, o options.PostprocessingOptions) postprocessing.Postprocessing {
waitfor := []string{"initialize"}
if !o.ASyncFileUploads {
if !o.AsyncFileUploads {
waitfor = append(waitfor, "assembling")
}

Expand Down

0 comments on commit a9e3435

Please sign in to comment.