Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

webdav: add workaround for missing mtime - fixes #2420

buergi753cc63d96ce
diff --git a/backend/webdav/api/types.go b/backend/webdav/api/types.go
index 983825418..7ee435b2c 100644
--- a/backend/webdav/api/types.go
+++ b/backend/webdav/api/types.go
@@ -155,6 +155,12 @@ func (t *Time) UnmarshalXML(d *xml.Decoder, start xml.StartElement) error {
return err
}
+ // If time is missing then return the epoch
+ if v == "" {
+ *t = Time(time.Unix(0, 0))
+ return nil
+ }
+
// Parse the time format in multiple possible ways
var newT time.Time
for _, timeFormat := range timeFormats {