Skip to content

Commit bcf6f68

Browse files
author
woytu
committed
去除冗余
1 parent f58d614 commit bcf6f68

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

utils/file.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,7 @@ func ContextPath(root string) (path string, err error) {
312312
err = errors.New("错误:路径不正确")
313313
return dir, err
314314
}
315-
return dir[0 : strings.LastIndex(dir, root)+len(root)], nil
315+
return dir[0 : index+len(root)], nil
316316
}
317317

318318
/**

0 commit comments

Comments
 (0)