forked from TrueCloudLab/rclone
dropbox, yandex: fix return of wrapped nil introduced in 79e3c67bbd
This commit is contained in:
parent
175c39e1d0
commit
5b6dd36307
2 changed files with 6 additions and 4 deletions
|
@ -207,11 +207,12 @@ func (f *Fs) setRoot(root string) {
|
||||||
// Return an Object from a path
|
// Return an Object from a path
|
||||||
//
|
//
|
||||||
// If it can't be found it returns the error fs.ErrorObjectNotFound.
|
// 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) {
|
func (f *Fs) newObjectWithInfo(remote string, info *dropbox.Entry) (fs.Object, error) {
|
||||||
o = &Object{
|
o := &Object{
|
||||||
fs: f,
|
fs: f,
|
||||||
remote: remote,
|
remote: remote,
|
||||||
}
|
}
|
||||||
|
var err error
|
||||||
if info != nil {
|
if info != nil {
|
||||||
err = o.setMetadataFromEntry(info)
|
err = o.setMetadataFromEntry(info)
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -327,11 +327,12 @@ func (f *Fs) NewObject(remote string) (fs.Object, error) {
|
||||||
// Return an Object from a path
|
// Return an Object from a path
|
||||||
//
|
//
|
||||||
// If it can't be found it returns the error fs.ErrorObjectNotFound.
|
// 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) {
|
func (f *Fs) newObjectWithInfo(remote string, info *yandex.ResourceInfoResponse) (fs.Object, error) {
|
||||||
o = &Object{
|
o := &Object{
|
||||||
fs: f,
|
fs: f,
|
||||||
remote: remote,
|
remote: remote,
|
||||||
}
|
}
|
||||||
|
var err error
|
||||||
if info != nil {
|
if info != nil {
|
||||||
err = o.setMetaData(info)
|
err = o.setMetaData(info)
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue