1
mirror of https://github.com/rclone/rclone synced 2024-12-11 23:54:00 +01:00

drive, acd: Tweak logging after changing Fs.Put so that it must cope with existing files

This commit is contained in:
Nick Craig-Wood 2016-06-18 10:54:42 +01:00
parent 2cfb3834f2
commit cc6a776034
2 changed files with 5 additions and 6 deletions

View File

@ -240,7 +240,7 @@ func (f *Fs) newFsObjectWithInfo(remote string, info *acd.Node) fs.Object {
} else {
err := o.readMetaData() // reads info and meta, returning an error
if err != nil {
// logged already FsDebug("Failed to read info: %s", err)
fs.Log(o, "Failed to read metadata: %s", err)
return nil
}
}
@ -624,7 +624,6 @@ func (o *Object) readMetaData() (err error) {
return o.fs.shouldRetry(resp, err)
})
if err != nil {
fs.Debug(o, "Failed to read info: %s", err)
return err
}
o.info = info.Node

View File

@ -360,7 +360,6 @@ func (f *Fs) newFsObjectWithInfoErr(remote string, info *drive.File) (fs.Object,
} else {
err := o.readMetaData() // reads info and meta, returning an error
if err != nil {
// logged already fs.Debug("Failed to read info: %s", err)
return nil, err
}
}
@ -371,8 +370,10 @@ func (f *Fs) newFsObjectWithInfoErr(remote string, info *drive.File) (fs.Object,
//
// May return nil if an error occurred
func (f *Fs) newFsObjectWithInfo(remote string, info *drive.File) fs.Object {
o, _ := f.newFsObjectWithInfoErr(remote, info)
// Errors have already been logged
o, err := f.newFsObjectWithInfoErr(remote, info)
if err != nil {
fs.Log(o, "Failed to read metadata: %v", err)
}
return o
}
@ -870,7 +871,6 @@ func (o *Object) readMetaData() (err error) {
return err
}
if !found {
fs.Debug(o, "%v", errorObjectNotFound)
return errorObjectNotFound
}
return nil