jottacloud: fix server-side copy onto a trashed file failing as corrupted

When a server-side copy landed on a file that was in the trash, rclone
restored it with a zero creation and modification time unless
--metadata was in use. The server then returned a time which couldn't be
parsed, the copy was reported as having size 0 and failed with
"corrupted on transfer".

The restored file now gets the source's times, as it did before
metadata support was added.
This commit is contained in:
Nick Craig-Wood committed 2026-10-27 17:24:14 +00:00
1 parent 9034f1bfb4
commit b8d4ea09c4
1 file changed
+2 -2
+2 -2
View File
@@ -1500,9 +1500,9 @@ func (f *Fs) Copy(ctx context.Context, src fs.Object, remote string) (fs.Object,
info, err := f.copyOrMove(ctx, "cp", srcObj.filePath(), remote)
if err == nil {
var createTime time.Time
createTime := srcObj.createTime
var createTimeMeta bool
var modTime time.Time
modTime := srcObj.modTime
var modTimeMeta bool
if meta != nil {
createTime, createTimeMeta = srcObj.parseFsMetadataTime(meta, "btime")