From 5fba9132071b8696cb9ae595f2bf700f2ec62403 Mon Sep 17 00:00:00 2001 From: Nick Craig-Wood Date: Mon, 27 Feb 2017 17:02:31 +0000 Subject: [PATCH] local: fix detection of directories in new object creation This stops the local listing erroring on all symlinks --- local/local.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/local/local.go b/local/local.go index 30b82b3f4..126afb160 100644 --- a/local/local.go +++ b/local/local.go @@ -162,7 +162,7 @@ func (f *Fs) newObjectWithInfo(remote string, info os.FileInfo) (fs.Object, erro return nil, err } } - if !o.info.Mode().IsRegular() { + if o.info.Mode().IsDir() { return nil, errors.Wrapf(fs.ErrorNotAFile, "%q", remote) } return o, nil