Skip to content

Commit

Permalink
fix(trainbit): incorrect filename display (#4027)
Browse files Browse the repository at this point in the history
  • Loading branch information
NightSpaceC authored Apr 2, 2023
1 parent d3efee2 commit 3cdb8e7
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/trainbit/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ func parseRawFileObject(rawObject []any) ([]model.Obj, error) {
}
isFolder := int64(object["ty"].(float64)) == 1
var name string
if isFolder {
name = object["name"].(string)
if object["ext"].(string) != "" {
name = strings.Join([]string{object["name"].(string), object["ext"].(string)}, ".")
} else {
name = object["name"].(string) + object["ext"].(string)
name = object["name"].(string)
}
modified, err := time.Parse("2006/01/02 15:04:05", object["modified"].(string))
if err != nil {
Expand Down

0 comments on commit 3cdb8e7

Please sign in to comment.