aboutsummaryrefslogtreecommitdiff
path: root/webdav/file.go
diff options
context:
space:
mode:
Diffstat (limited to 'webdav/file.go')
-rw-r--r--webdav/file.go14
1 files changed, 14 insertions, 0 deletions
diff --git a/webdav/file.go b/webdav/file.go
index 31b1e9d..6e3563e 100644
--- a/webdav/file.go
+++ b/webdav/file.go
@@ -702,10 +702,24 @@ func copyFiles(fs FileSystem, src, dst string, overwrite bool, depth int, recurs
}
_, copyErr := io.Copy(dstFile, srcFile)
+ var propsErr error
+ if s, ok := srcFile.(DeadPropsHolder); ok {
+ if d, ok := dstFile.(DeadPropsHolder); ok {
+ m := s.DeadProps()
+ props := make([]Property, 0, len(m))
+ for _, prop := range m {
+ props = append(props, prop)
+ }
+ _, propsErr = d.Patch([]Proppatch{{Props: props}})
+ }
+ }
closeErr := dstFile.Close()
if copyErr != nil {
return http.StatusInternalServerError, copyErr
}
+ if propsErr != nil {
+ return http.StatusInternalServerError, propsErr
+ }
if closeErr != nil {
return http.StatusInternalServerError, closeErr
}