runtime error: slice bounds out of range [33:7]
when data is huge and driver response with a limit frequency, the 'runtime error: slice bounds out of range [33:7]' error may occur. Signed-off-by: wutongjie23hao <xiaolei.liang@qq.com>
This commit is contained in:
parent
36d8c594d7
commit
167f1712b8
1 changed files with 5 additions and 1 deletions
|
@ -138,7 +138,11 @@ func compareReplaceInline(s1, s2 string, old, new byte) int {
|
|||
// with Walk to do handling with repositories in a storage.
|
||||
func handleRepository(fileInfo driver.FileInfo, root, last string, fn func(repoPath string) error) error {
|
||||
filePath := fileInfo.Path()
|
||||
|
||||
|
||||
if len(filePath) <= len(root) {
|
||||
return nil
|
||||
}
|
||||
|
||||
// lop the base path off
|
||||
repo := filePath[len(root)+1:]
|
||||
|
||||
|
|
Loading…
Reference in a new issue