Browse Source

Fix store file link bug

HEAD
Yang Luo 2 years ago
parent
commit
6ccf90feb1
1 changed files with 5 additions and 1 deletions
  1. +5
    -1
      object/store_provider.go

+ 5
- 1
object/store_provider.go View File

@@ -119,7 +119,11 @@ func (store *Store) Populate(origin string) error {
lastModifiedTime := object.LastModified
isLeaf := isObjectLeaf(object)
size := object.Size
url, _ := urllib.JoinPath(origin, object.Url)

url := object.Url
if !strings.HasPrefix(url, "http://") && !strings.HasPrefix(url, "https://") {
url, _ = urllib.JoinPath(origin, object.Url)
}

tokens := strings.Split(strings.Trim(object.Key, "/"), "/")
store.createPathIfNotExisted(tokens, size, url, lastModifiedTime, isLeaf)


Loading…
Cancel
Save