Skip to content

Commit 607f842

Browse files
asmyasnikovrekby
authored andcommitted
Update path.go
1 parent a0ae199 commit 607f842

File tree

1 file changed

+2
-10
lines changed

1 file changed

+2
-10
lines changed

sugar/path.go

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,7 @@ func RemoveRecursive(ctx context.Context, db ydb.Connection, pathToRemove string
105105
if err = list(i+1, pt); err != nil {
106106
return xerrors.WithStackTrace(err)
107107
}
108-
err = retry.Retry(ctx, func(ctx context.Context) (err error) {
109-
return db.Scheme().RemoveDirectory(ctx, pt)
110-
}, retry.WithIdempotent(true))
108+
err = return db.Scheme().RemoveDirectory(ctx, pt)
111109
if err != nil {
112110
return xerrors.WithStackTrace(err)
113111
}
@@ -127,13 +125,7 @@ func RemoveRecursive(ctx context.Context, db ydb.Connection, pathToRemove string
127125
}
128126

129127
default:
130-
}
131-
132-
if len(p) != 0 {
133-
err = db.Scheme().RemoveDirectory(ctx, p)
134-
if err != nil {
135-
return err
136-
}
128+
return xerrors.WithStackTrace(fmt.Errorf("unknown entry type: %s", child.Type.String()))
137129
}
138130
}
139131
return nil

0 commit comments

Comments
 (0)