From bc8ab9b3921c6e290adfc5197a31259bbfe48839 Mon Sep 17 00:00:00 2001 From: Brian Bland Date: Wed, 17 Dec 2014 16:56:36 -0800 Subject: [PATCH] Fixes filesystem storage driver List semantics for nonexistent directory Now returns a PathNotFoundError --- storagedriver/filesystem/driver.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/storagedriver/filesystem/driver.go b/storagedriver/filesystem/driver.go index 3c3c950f..0fb5e6fc 100644 --- a/storagedriver/filesystem/driver.go +++ b/storagedriver/filesystem/driver.go @@ -201,6 +201,9 @@ func (d *Driver) List(subPath string) ([]string, error) { dir, err := os.Open(fullPath) if err != nil { + if os.IsNotExist(err) { + return nil, storagedriver.PathNotFoundError{Path: subPath} + } return nil, err }