studio-b12 / gowebdav

A golang WebDAV client library and command line tool.
BSD 3-Clause "New" or "Revised" License
309 stars 89 forks source link

Handle request errors in copymove #44

Closed miquella closed 3 years ago

miquella commented 3 years ago

I've been connecting to my Synology's WebDAV and have been encountering semi-regular panics with the following stacktrace:

github.com/studio-b12/gowebdav.(*Client).copymove(0xc0004ec140, 0x12c5bd5, 0x4, 0xc01a132dc0, 0x4e, 0xc0190efe80, 0x3a, 0x1, 0x0, 0x0)
        /home/runner/go/pkg/mod/github.com/studio-b12/gowebdav@v0.0.0-20210203212356-8244b5a5f51a/requests.go:141 +0xbc
github.com/studio-b12/gowebdav.(*Client).Rename(...)
        /home/runner/go/pkg/mod/github.com/studio-b12/gowebdav@v0.0.0-20210203212356-8244b5a5f51a/client.go:302
…

It appears that this is simply due to not properly handling request errors during copy/move.

chripo commented 3 years ago

thank you!!