Merge pull request #1051 from xushuxun/master
volume: read dat files' last modified time correctly
This commit is contained in:
@@ -31,12 +31,12 @@ func (v *Volume) load(alsoLoadIndex bool, createDatIfMissing bool, needleMapKind
|
|||||||
}
|
}
|
||||||
if canWrite {
|
if canWrite {
|
||||||
v.dataFile, e = os.OpenFile(fileName+".dat", os.O_RDWR|os.O_CREATE, 0644)
|
v.dataFile, e = os.OpenFile(fileName+".dat", os.O_RDWR|os.O_CREATE, 0644)
|
||||||
v.lastModifiedTsSeconds = uint64(modifiedTime.Unix())
|
|
||||||
} else {
|
} else {
|
||||||
glog.V(0).Infoln("opening " + fileName + ".dat in READONLY mode")
|
glog.V(0).Infoln("opening " + fileName + ".dat in READONLY mode")
|
||||||
v.dataFile, e = os.Open(fileName + ".dat")
|
v.dataFile, e = os.Open(fileName + ".dat")
|
||||||
v.readOnly = true
|
v.readOnly = true
|
||||||
}
|
}
|
||||||
|
v.lastModifiedTsSeconds = uint64(modifiedTime.Unix())
|
||||||
if fileSize >= _SuperBlockSize {
|
if fileSize >= _SuperBlockSize {
|
||||||
alreadyHasSuperBlock = true
|
alreadyHasSuperBlock = true
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user