snapshot; starting 'driveClient'

This commit is contained in:
Michael Quigley 2024-01-03 16:58:32 -05:00
parent 7e1a42e8a1
commit 0c39cd8752
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62
2 changed files with 17 additions and 1 deletions

View File

@ -0,0 +1,15 @@
package driveClient
import "net/http"
type Client struct {
client *http.Client
}
func NewHttpClient(uri string) *Client {
return &Client{&http.Client{}}
}
func (c *Client) Connect() error {
return nil
}

View File

@ -38,7 +38,8 @@ func NewWebDAVTarget(cfg *WebDAVTargetConfig) (*WebDAVTarget, error) {
func (t *WebDAVTarget) Inventory() ([]*Object, error) {
fi, err := t.c.Stat("")
if !fi.IsDir() {
if fi != nil && !fi.IsDir() {
t.isDir = false
return []*Object{{
Path: fi.Name(),