Change the interface of SetModTime to return an error - #348

This commit is contained in:
Nick Craig-Wood
2016-03-22 15:56:44 +00:00
parent f469905d07
commit 414b35ea56
12 changed files with 39 additions and 53 deletions
+3 -3
View File
@@ -802,13 +802,13 @@ func (o *Object) setModTime(modTime time.Time) (*api.Item, error) {
}
// SetModTime sets the modification time of the local fs object
func (o *Object) SetModTime(modTime time.Time) {
func (o *Object) SetModTime(modTime time.Time) error {
info, err := o.setModTime(modTime)
if err != nil {
fs.Stats.Error()
fs.ErrorLog(o, "Failed to update remote mtime: %v", err)
return err
}
o.setMetaData(info)
return nil
}
// Storable returns a boolean showing whether this object storable