parent
c069fbf268
commit
9e9a90f8ef
|
|
@ -2,10 +2,11 @@ package state
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"go.uber.org/zap"
|
|
||||||
"net/url"
|
"net/url"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"sort"
|
"sort"
|
||||||
|
|
||||||
|
"go.uber.org/zap"
|
||||||
)
|
)
|
||||||
|
|
||||||
type Storage struct {
|
type Storage struct {
|
||||||
|
|
@ -86,7 +87,7 @@ func (st *Storage) ExpandPaths(globPattern string) ([]string, error) {
|
||||||
// normalizes relative path to absolute one
|
// normalizes relative path to absolute one
|
||||||
func (st *Storage) normalizePath(path string) string {
|
func (st *Storage) normalizePath(path string) string {
|
||||||
u, _ := url.Parse(path)
|
u, _ := url.Parse(path)
|
||||||
if u.Scheme != "" || filepath.IsAbs(path) {
|
if u != nil && (u.Scheme != "" || filepath.IsAbs(path)) {
|
||||||
return path
|
return path
|
||||||
} else {
|
} else {
|
||||||
return st.JoinBase(path)
|
return st.JoinBase(path)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue