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 22, 2021
1 parent bc90c4e commit e6789a8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
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 e6789a8

Please sign in to comment.