Skip to content

Commit 378e37b

Browse files
authored
fix(drivers/github): failed to get objs (#1915)
fix(drivers/github): failed get objs
1 parent 5c82f55 commit 378e37b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/github/types.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"time"
55

66
"github.com/OpenListTeam/OpenList/v4/internal/model"
7+
"github.com/OpenListTeam/OpenList/v4/pkg/utils"
78
)
89

910
type Links struct {
@@ -36,6 +37,7 @@ func (o *Object) toModelObj() *model.Object {
3637
Size: o.Size,
3738
Modified: time.Unix(0, 0),
3839
IsFolder: o.Type == "dir",
40+
Path: utils.FixAndCleanPath(o.Path),
3941
}
4042
}
4143

@@ -69,6 +71,7 @@ func (o *TreeObjResp) toModelObj() *model.Object {
6971
Size: o.Size,
7072
Modified: time.Unix(0, 0),
7173
IsFolder: o.Type == "tree",
74+
Path: utils.FixAndCleanPath(o.Path),
7275
}
7376
}
7477

0 commit comments

Comments
 (0)