dropbox, yandex: fix return of wrapped nil introduced in 79e3c67bbd

This commit is contained in:
Nick Craig-Wood 2017-02-25 15:23:27 +00:00
parent 175c39e1d0
commit 5b6dd36307
2 changed files with 6 additions and 4 deletions

View File

@ -207,11 +207,12 @@ func (f *Fs) setRoot(root string) {
// Return an Object from a path
//
// If it can't be found it returns the error fs.ErrorObjectNotFound.
func (f *Fs) newObjectWithInfo(remote string, info *dropbox.Entry) (o *Object, err error) {
o = &Object{
func (f *Fs) newObjectWithInfo(remote string, info *dropbox.Entry) (fs.Object, error) {
o := &Object{
fs: f,
remote: remote,
}
var err error
if info != nil {
err = o.setMetadataFromEntry(info)
} else {

View File

@ -327,11 +327,12 @@ func (f *Fs) NewObject(remote string) (fs.Object, error) {
// Return an Object from a path
//
// If it can't be found it returns the error fs.ErrorObjectNotFound.
func (f *Fs) newObjectWithInfo(remote string, info *yandex.ResourceInfoResponse) (o *Object, err error) {
o = &Object{
func (f *Fs) newObjectWithInfo(remote string, info *yandex.ResourceInfoResponse) (fs.Object, error) {
o := &Object{
fs: f,
remote: remote,
}
var err error
if info != nil {
err = o.setMetaData(info)
} else {