aboutsummaryrefslogtreecommitdiff
path: root/internal/lfsutil/storage.go
diff options
context:
space:
mode:
authorᴜɴᴋɴᴡᴏɴ <u@gogs.io>2020-04-05 00:14:22 +0800
committerGitHub <noreply@github.com>2020-04-05 00:14:22 +0800
commit53b91ef306166d39dea3c70fb8ce14973c7ae111 (patch)
tree9accdd3c806ef7e0645bb10810c922e7108f438b /internal/lfsutil/storage.go
parent34145c990d4fd9f278f29cdf9c61378a75e9b934 (diff)
lfs: run e2e and fix minor issues (#6059)
Diffstat (limited to 'internal/lfsutil/storage.go')
-rw-r--r--internal/lfsutil/storage.go5
1 files changed, 1 insertions, 4 deletions
diff --git a/internal/lfsutil/storage.go b/internal/lfsutil/storage.go
index fa10ee03..b2bfe37f 100644
--- a/internal/lfsutil/storage.go
+++ b/internal/lfsutil/storage.go
@@ -6,7 +6,6 @@ package lfsutil
import (
"path/filepath"
- "strings"
)
// Storage is the storage type of an LFS object.
@@ -23,7 +22,5 @@ func StorageLocalPath(root string, oid OID) string {
return ""
}
- // Valid OID is guaranteed to have second element as hash.
- hash := strings.SplitN(string(oid), ":", 2)[1]
- return filepath.Join(root, string(hash[0]), string(hash[1]), hash)
+ return filepath.Join(root, string(oid[0]), string(oid[1]), string(oid))
}