func (s *Storage) Path(l *location.Location) string { path := "" if l.IsRemote() { u, _ := url.Parse(l.Dir) path = filepath.Join(s.Config.BaseDir, s.Config.RemoteDir, u.Host, u.Path, l.Filename) download(l.Dir+l.Filename, path) } else { path = filepath.Join(s.Config.BaseDir, l.Dir, l.Filename) } return path }