Miscellaneous storagedriver+ipc fixes
Fixes/tests listing for keys beginning with "/" No longer extraneously wraps Closers in ioutil.NopClosers Uses omitempty for all ipc struct type fields
This commit is contained in:
parent
b65d8d046e
commit
68fd15b688
6 changed files with 33 additions and 25 deletions
|
@ -5,7 +5,6 @@ import (
|
|||
"io/ioutil"
|
||||
"os"
|
||||
"path"
|
||||
"strings"
|
||||
|
||||
"github.com/docker/docker-registry/storagedriver"
|
||||
"github.com/docker/docker-registry/storagedriver/factory"
|
||||
|
@ -177,7 +176,9 @@ func (d *Driver) CurrentSize(subPath string) (uint64, error) {
|
|||
// List returns a list of the objects that are direct descendants of the given
|
||||
// path.
|
||||
func (d *Driver) List(subPath string) ([]string, error) {
|
||||
subPath = strings.TrimRight(subPath, "/")
|
||||
if subPath[len(subPath)-1] != '/' {
|
||||
subPath += "/"
|
||||
}
|
||||
fullPath := d.subPath(subPath)
|
||||
|
||||
dir, err := os.Open(fullPath)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue