Local Fetcher: fix path detection
This commit is contained in:
parent
4fb04e66bd
commit
49117d619a
|
@ -21,7 +21,11 @@ func (f *LocalFetcher) Match(url *url.URL) bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
return isFilesystemPath(url.Path)
|
if url.Scheme == "" && isFilesystemPath(url.Path) {
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
func NewLocalFetcher() *LocalFetcher {
|
func NewLocalFetcher() *LocalFetcher {
|
||||||
|
@ -29,5 +33,5 @@ func NewLocalFetcher() *LocalFetcher {
|
||||||
}
|
}
|
||||||
|
|
||||||
func isFilesystemPath(path string) bool {
|
func isFilesystemPath(path string) bool {
|
||||||
return strings.HasPrefix(path, "./") || strings.HasPrefix(path, "/")
|
return strings.HasPrefix(path, ".") || strings.HasPrefix(path, "/")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue