diff --git a/amazonclouddrive/amazonclouddrive.go b/amazonclouddrive/amazonclouddrive.go index 750f6d138..8f48d9348 100644 --- a/amazonclouddrive/amazonclouddrive.go +++ b/amazonclouddrive/amazonclouddrive.go @@ -639,12 +639,12 @@ func (o *Object) readMetaData() (err error) { func (o *Object) ModTime() time.Time { err := o.readMetaData() if err != nil { - fs.Log(o, "Failed to read metadata: %s", err) + fs.Log(o, "Failed to read metadata: %v", err) return time.Now() } modTime, err := time.Parse(timeFormat, *o.info.ModifiedDate) if err != nil { - fs.Log(o, "Failed to read mtime from object: %s", err) + fs.Log(o, "Failed to read mtime from object: %v", err) return time.Now() } return modTime diff --git a/drive/drive.go b/drive/drive.go index 2016e2f54..fb285fc94 100644 --- a/drive/drive.go +++ b/drive/drive.go @@ -884,12 +884,12 @@ func (o *Object) readMetaData() (err error) { func (o *Object) ModTime() time.Time { err := o.readMetaData() if err != nil { - fs.Log(o, "Failed to read metadata: %s", err) + fs.Log(o, "Failed to read metadata: %v", err) return time.Now() } modTime, err := time.Parse(timeFormatIn, o.modifiedDate) if err != nil { - fs.Log(o, "Failed to read mtime from object: %s", err) + fs.Log(o, "Failed to read mtime from object: %v", err) return time.Now() } return modTime diff --git a/dropbox/dropbox.go b/dropbox/dropbox.go index 71eb4fcbf..3f5a3b152 100644 --- a/dropbox/dropbox.go +++ b/dropbox/dropbox.go @@ -679,7 +679,7 @@ func (o *Object) readMetaData() (err error) { func (o *Object) ModTime() time.Time { err := o.readMetaData() if err != nil { - fs.Log(o, "Failed to read metadata: %s", err) + fs.Log(o, "Failed to read metadata: %v", err) return time.Now() } return o.modTime diff --git a/fs/operations.go b/fs/operations.go index bd6b04c84..4221042d1 100644 --- a/fs/operations.go +++ b/fs/operations.go @@ -72,7 +72,7 @@ func CheckHashes(src, dst Object) (equal bool, hash HashType, err error) { srcHash, err := src.Hash(hash) if err != nil { Stats.Error() - ErrorLog(src, "Failed to calculate src hash: %s", err) + ErrorLog(src, "Failed to calculate src hash: %v", err) return false, hash, err } if srcHash == "" { @@ -81,7 +81,7 @@ func CheckHashes(src, dst Object) (equal bool, hash HashType, err error) { dstHash, err := dst.Hash(hash) if err != nil { Stats.Error() - ErrorLog(dst, "Failed to calculate dst hash: %s", err) + ErrorLog(dst, "Failed to calculate dst hash: %v", err) return false, hash, err } if dstHash == "" { @@ -156,7 +156,7 @@ func Equal(src, dst Object) bool { return false } else if err != nil { Stats.Error() - ErrorLog(dst, "Failed to read set modification time: %s", err) + ErrorLog(dst, "Failed to read set modification time: %v", err) } } @@ -222,7 +222,7 @@ tryAgain: in0, err = src.Open() if err != nil { Stats.Error() - ErrorLog(src, "Failed to open: %s", err) + ErrorLog(src, "Failed to open: %v", err) return } @@ -258,7 +258,7 @@ tryAgain: } if err != nil { Stats.Error() - ErrorLog(src, "Failed to copy: %s", err) + ErrorLog(src, "Failed to copy: %v", err) removeFailedCopy(dst) return } @@ -267,7 +267,7 @@ tryAgain: if !Config.IgnoreSize && src.Size() != dst.Size() { Stats.Error() err = errors.Errorf("corrupted on transfer: sizes differ %d vs %d", src.Size(), dst.Size()) - ErrorLog(dst, "%s", err) + ErrorLog(dst, "%v", err) removeFailedCopy(dst) return } @@ -284,16 +284,16 @@ tryAgain: srcSum, err := src.Hash(hashType) if err != nil { Stats.Error() - ErrorLog(src, "Failed to read src hash: %s", err) + ErrorLog(src, "Failed to read src hash: %v", err) } else if srcSum != "" { dstSum, err := dst.Hash(hashType) if err != nil { Stats.Error() - ErrorLog(dst, "Failed to read hash: %s", err) + ErrorLog(dst, "Failed to read hash: %v", err) } else if !HashEquals(srcSum, dstSum) { Stats.Error() err = errors.Errorf("corrupted on transfer: %v hash differ %q vs %q", hashType, srcSum, dstSum) - ErrorLog(dst, "%s", err) + ErrorLog(dst, "%v", err) removeFailedCopy(dst) return } @@ -435,7 +435,7 @@ func DeleteFile(dst Object) { Stats.DoneChecking(dst) if err != nil { Stats.Error() - ErrorLog(dst, "Couldn't delete: %s", err) + ErrorLog(dst, "Couldn't delete: %v", err) } else { Debug(dst, "Deleted") } diff --git a/googlecloudstorage/googlecloudstorage.go b/googlecloudstorage/googlecloudstorage.go index 596bbc9a1..89a476012 100644 --- a/googlecloudstorage/googlecloudstorage.go +++ b/googlecloudstorage/googlecloudstorage.go @@ -612,7 +612,7 @@ func (o *Object) readMetaData() (err error) { func (o *Object) ModTime() time.Time { err := o.readMetaData() if err != nil { - // fs.Log(o, "Failed to read metadata: %s", err) + // fs.Log(o, "Failed to read metadata: %v", err) return time.Now() } return o.modTime diff --git a/onedrive/onedrive.go b/onedrive/onedrive.go index 28c88ff1c..a0ea16aa3 100644 --- a/onedrive/onedrive.go +++ b/onedrive/onedrive.go @@ -663,7 +663,7 @@ func (o *Object) Hash(t fs.HashType) (string, error) { func (o *Object) Size() int64 { err := o.readMetaData() if err != nil { - fs.Log(o, "Failed to read metadata: %s", err) + fs.Log(o, "Failed to read metadata: %v", err) return 0 } return o.size @@ -720,7 +720,7 @@ func (o *Object) readMetaData() (err error) { func (o *Object) ModTime() time.Time { err := o.readMetaData() if err != nil { - fs.Log(o, "Failed to read metadata: %s", err) + fs.Log(o, "Failed to read metadata: %v", err) return time.Now() } return o.modTime diff --git a/s3/s3.go b/s3/s3.go index 3d5eaab11..58eaef6c5 100644 --- a/s3/s3.go +++ b/s3/s3.go @@ -699,7 +699,7 @@ func (o *Object) readMetaData() (err error) { o.bytes = size o.meta = resp.Metadata if resp.LastModified == nil { - fs.Log(o, "Failed to read last modified from HEAD: %s", err) + fs.Log(o, "Failed to read last modified from HEAD: %v", err) o.lastModified = time.Now() } else { o.lastModified = *resp.LastModified @@ -714,7 +714,7 @@ func (o *Object) readMetaData() (err error) { func (o *Object) ModTime() time.Time { err := o.readMetaData() if err != nil { - fs.Log(o, "Failed to read metadata: %s", err) + fs.Log(o, "Failed to read metadata: %v", err) return time.Now() } // read mtime out of metadata if available @@ -725,7 +725,7 @@ func (o *Object) ModTime() time.Time { } modTime, err := swift.FloatStringToTime(*d) if err != nil { - fs.Log(o, "Failed to read mtime from object: %s", err) + fs.Log(o, "Failed to read mtime from object: %v", err) return o.lastModified } return modTime diff --git a/swift/swift.go b/swift/swift.go index 09f845d47..c924fecdc 100644 --- a/swift/swift.go +++ b/swift/swift.go @@ -580,7 +580,7 @@ func (o *Object) ModTime() time.Time { } modTime, err := o.headers.ObjectMetadata().GetModTime() if err != nil { - // fs.Log(o, "Failed to read mtime from object: %s", err) + // fs.Log(o, "Failed to read mtime from object: %v", err) return o.info.LastModified } return modTime diff --git a/yandex/yandex.go b/yandex/yandex.go index ec38240d3..454d66b71 100644 --- a/yandex/yandex.go +++ b/yandex/yandex.go @@ -477,7 +477,7 @@ func (o *Object) Size() int64 { func (o *Object) ModTime() time.Time { err := o.readMetaData() if err != nil { - fs.Log(o, "Failed to read metadata: %s", err) + fs.Log(o, "Failed to read metadata: %v", err) return time.Now() } return o.modTime