From 3222d40871fcaeec88d0cf8efe66786cce22b330 Mon Sep 17 00:00:00 2001 From: Chris Lu Date: Sun, 14 Apr 2013 19:37:29 -0700 Subject: [PATCH] fix compilation error --- go/storage/store.go | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/go/storage/store.go b/go/storage/store.go index 91f3be943..4bf0f4ef3 100644 --- a/go/storage/store.go +++ b/go/storage/store.go @@ -173,9 +173,10 @@ func (s *Store) Close() { } } func (s *Store) Write(i VolumeId, n *Needle) (size uint32, err error) { - if v := s.volumes[i]; v != nil && !v.readOnly { + if v := s.volumes[i]; v != nil { if v.readOnly { - err = errors.New("Volume " + i + " is read only!") + err = errors.New("Volume " + i.String() + " is read only!") + return } else { size, err = v.write(n) if err != nil && s.volumeSizeLimit < v.ContentSize()+uint64(size) && s.volumeSizeLimit >= v.ContentSize() { @@ -188,7 +189,7 @@ func (s *Store) Write(i VolumeId, n *Needle) (size uint32, err error) { return } log.Println("volume", i, "not found!") - err = errors.New("Volume " + i + " not found!") + err = errors.New("Volume " + i.String() + " not found!") return } func (s *Store) Delete(i VolumeId, n *Needle) (uint32, error) {