Skip to content

Commit

Permalink
Check error when setting the mtime
Browse files Browse the repository at this point in the history
  • Loading branch information
aduffeck committed Jan 11, 2024
1 parent 1088f5d commit 02ac8d2
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pkg/storage/utils/decomposedfs/revisions.go
Original file line number Diff line number Diff line change
Expand Up @@ -272,11 +272,15 @@ func (fs *Decomposedfs) RestoreRevision(ctx context.Context, ref *provider.Refer
return errtypes.InternalError("failed to copy blob xattrs to old revision to node: " + err.Error())
}
// always set the node mtime to the current time
fs.lu.MetadataBackend().SetMultiple(ctx, nodePath,
err = fs.lu.MetadataBackend().SetMultiple(ctx, nodePath,
map[string][]byte{
prefixes.MTimeAttr: []byte(time.Now().UTC().Format(time.RFC3339Nano)),
},
false)
if err != nil {
return errtypes.InternalError("failed to set mtime attribue on node: " + err.Error())

Check failure on line 281 in pkg/storage/utils/decomposedfs/revisions.go

View workflow job for this annotation

GitHub Actions / lint

`attribue` is a misspelling of `attribute` (misspell)
}

revisionSize, err := fs.lu.MetadataBackend().GetInt64(ctx, restoredRevisionPath, prefixes.BlobsizeAttr)
if err != nil {
return errtypes.InternalError("failed to read blob size xattr from old revision")
Expand Down

0 comments on commit 02ac8d2

Please sign in to comment.