Skip to content

Commit

Permalink
Make CI happy
Browse files Browse the repository at this point in the history
  • Loading branch information
Klaas Freitag committed Feb 8, 2022
1 parent 3689806 commit 86fbc4d
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions pkg/storage/utils/decomposedfs/decomposedfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,9 @@ func (fs *Decomposedfs) CreateHome(ctx context.Context) (err error) {
defer func() {
if err != nil {
// do not catch the error to not shadow the original error
fs.tp.Delete(ctx, n)
if tmpErr := fs.tp.Delete(ctx, n); tmpErr != nil {
appctx.GetLogger(ctx).Error().Err(tmpErr).Msg("Can not revert file system change after error")
}
}
}()

Expand Down Expand Up @@ -396,10 +398,15 @@ func (fs *Decomposedfs) CreateReference(ctx context.Context, p string, targetURI
if err != nil {
// do not catch the error to not shadow the original error
if childCreated && childNode != nil {
fs.tp.Delete(ctx, childNode)
if tmpErr := fs.tp.Delete(ctx, childNode); tmpErr != nil {
appctx.GetLogger(ctx).Error().Err(tmpErr).Msg("Can not clean up child node after error")
}
}
if parentCreated && parentNode != nil {
fs.tp.Delete(ctx, parentNode)
if tmpErr := fs.tp.Delete(ctx, parentNode); tmpErr != nil {
appctx.GetLogger(ctx).Error().Err(tmpErr).Msg("Can not clean up parent node after error")
}

}
}
}()
Expand Down

0 comments on commit 86fbc4d

Please sign in to comment.