From 3199fd85fb86324f8af82868d495437839660cb6 Mon Sep 17 00:00:00 2001 From: Andrey Smirnov Date: Wed, 11 Jun 2014 20:27:49 +0400 Subject: [PATCH] Fix publish updating (switching) for empty -> empty scenario. #66 --- files/public.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/files/public.go b/files/public.go index ed68d44b..50b26cfe 100644 --- a/files/public.go +++ b/files/public.go @@ -111,6 +111,11 @@ func (storage *PublishedStorage) Filelist(prefix string) ([]string, error) { return nil }) + if err != nil && os.IsNotExist(err) { + // file path doesn't exist, consider it empty + return []string{}, nil + } + return result, err }