mirror of
https://github.com/rclone/rclone.git
synced 2026-10-28 06:18:39 -04:00
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:
1 parent
9034f1bfb4
commit
b8d4ea09c4
1 file changed
+2
-2
@@ -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")
|
||||
|
||||
Reference in new issue
Block a user