Browse Source

bug fix

pull/279/head
tnextday 10 years ago
parent
commit
7eac1c46a2
  1. 12
      go/storage/volume.go

12
go/storage/volume.go

@ -87,12 +87,14 @@ func (v *Volume) load(alsoLoadIndex bool, createDatIfMissing bool, needleMapKind
} }
} }
if v.version == NoneVersion {
e = v.readSuperBlock()
} else {
e = v.maybeWriteSuperBlock()
if e = v.maybeWriteSuperBlock(); e != nil {
return e
} }
if e == nil && alsoLoadIndex {
if e = v.readSuperBlock(); e != nil {
return e
}
if alsoLoadIndex {
var indexFile *os.File var indexFile *os.File
if v.readOnly { if v.readOnly {
glog.V(1).Infoln("open to read file", fileName+".idx") glog.V(1).Infoln("open to read file", fileName+".idx")

Loading…
Cancel
Save