Skip to content

Commit

Permalink
Fix linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
aduffeck committed Mar 17, 2021
1 parent ec4d59e commit 5b648ae
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/storage/utils/decomposedfs/node/node_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ var _ = Describe("Node", func() {
Expect(len(ri.Etag)).To(Equal(34))
before := ri.Etag

n.SetTMTime(time.Now().UTC())
Expect(n.SetTMTime(time.Now().UTC())).To(Succeed())

ri, err = n.AsResourceInfo(env.Ctx, node.OwnerPermissions, []string{})
Expect(err).ToNot(HaveOccurred())
Expand Down
3 changes: 3 additions & 0 deletions pkg/storage/utils/decomposedfs/tree/tree_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ var _ = Describe("Tree", func() {
Expect(restoreFunc()).To(Succeed())

originalNode, err := env.Lookup.NodeFromPath(env.Ctx, originalPath)
Expect(err).ToNot(HaveOccurred())
Expect(originalNode.Exists).To(BeTrue())
})

Expand All @@ -155,9 +156,11 @@ var _ = Describe("Tree", func() {
Expect(restoreFunc()).To(Succeed())

newNode, err := env.Lookup.NodeFromPath(env.Ctx, "dir1/newLocation")
Expect(err).ToNot(HaveOccurred())
Expect(newNode.Exists).To(BeTrue())

originalNode, err := env.Lookup.NodeFromPath(env.Ctx, originalPath)
Expect(err).ToNot(HaveOccurred())
Expect(originalNode.Exists).To(BeFalse())
})

Expand Down
7 changes: 4 additions & 3 deletions pkg/storage/utils/localfs/localfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -1191,11 +1191,12 @@ func (fs *localfs) RestoreRecycleItem(ctx context.Context, restoreKey, restorePa
}

var localRestorePath string
if restorePath != "" {
switch {
case restorePath != "":
localRestorePath = fs.wrap(ctx, restorePath)
} else if fs.isShareFolder(ctx, filePath) {
case fs.isShareFolder(ctx, filePath):
localRestorePath = fs.wrapReferences(ctx, filePath)
} else {
default:
localRestorePath = fs.wrap(ctx, filePath)
}

Expand Down

0 comments on commit 5b648ae

Please sign in to comment.