empty backend type

This commit is contained in:
Chapuis Bertil 2015-09-09 10:46:54 +02:00
parent 65767fc061
commit e69d5b7615
2 changed files with 3 additions and 6 deletions

View file

@ -79,10 +79,7 @@ func (r *Repository) ReadBlob(bt backend.Type, id backend.ID) (io.ReadSeeker, er
file := filepath.Join(r.path, string(bt), id.String())
f, err := os.Open(file)
defer f.Close()
if err != nil {
return f, err
}
return f, nil
return f, err
}
func (r *Repository) WriteBlob(bt backend.Type, id backend.ID, data []byte) error {

View file

@ -50,12 +50,12 @@ func TestBackendType(t *testing.T) {
var bt backend.Type
bt = BackendType("/")
if !bt.IsNull() {
if bt != "" {
t.Error("backend type should be nil")
}
bt = BackendType("/test")
if !bt.IsNull() {
if bt != "" {
t.Error("backend type should be nil")
}