Fix alias bug
This commit is contained in:
+1
-1
@@ -31,7 +31,7 @@ func isValidAliasName(aliasName string) bool {
|
||||
return validAliasName.MatchString(aliasName)
|
||||
}
|
||||
|
||||
// getAliasURL expands aliased (name:/path) to full URL, used by url-parser.
|
||||
// getAliasURL expands aliased (name/path) to full URL, used by url-parser.
|
||||
func getAliasURL(aliasedURL string, aliases map[string]string) string {
|
||||
for aliasName, aliasValue := range aliases {
|
||||
if strings.HasPrefix(aliasedURL, aliasName) {
|
||||
|
||||
@@ -33,7 +33,11 @@ const (
|
||||
func urlJoinPath(url1, url2 string) string {
|
||||
u1 := client.NewURL(url1)
|
||||
u2 := client.NewURL(url2)
|
||||
u1.Path = filepath.Join(u1.Path, u2.Path)
|
||||
if u1.Path != string(u1.Separator) {
|
||||
u1.Path = filepath.Join(u1.Path, u2.Path)
|
||||
} else {
|
||||
u1.Path = u2.Path
|
||||
}
|
||||
return u1.String()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user