client도 storageroot지원
This commit is contained in:
@ -3,6 +3,7 @@ package shared
|
||||
import (
|
||||
"io/fs"
|
||||
"os"
|
||||
"path"
|
||||
"strings"
|
||||
)
|
||||
|
||||
@ -89,9 +90,10 @@ func CompareVersionString(lhs, rhs ParsedVersionString) int {
|
||||
return len(lhs) - len(rhs)
|
||||
}
|
||||
|
||||
func FindLastestVersion(root string) (string, error) {
|
||||
func FindLastestVersion(storageRoot, name string) (string, error) {
|
||||
// 최신 버전을 찾음
|
||||
entries, err := os.ReadDir(root)
|
||||
targetPath := path.Join(storageRoot, name)
|
||||
entries, err := os.ReadDir(targetPath)
|
||||
if err != nil {
|
||||
return "", err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user