diff options
| author | Chris Lu <chris.lu@gmail.com> | 2020-08-18 17:23:01 -0700 |
|---|---|---|
| committer | Chris Lu <chris.lu@gmail.com> | 2020-08-18 17:23:01 -0700 |
| commit | 332caf0cd7881ef4881099fee09ac9c8a63d8f0b (patch) | |
| tree | cc0dc9ece8db282dbc2fdc049a1bd90f22011cb3 /unmaintained/fix_dat | |
| parent | 6a92f0bc7a2cbf0828c720422220b600263b5217 (diff) | |
| download | seaweedfs-332caf0cd7881ef4881099fee09ac9c8a63d8f0b.tar.xz seaweedfs-332caf0cd7881ef4881099fee09ac9c8a63d8f0b.zip | |
maintain the unmaintained
Diffstat (limited to 'unmaintained/fix_dat')
| -rw-r--r-- | unmaintained/fix_dat/fix_dat.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/unmaintained/fix_dat/fix_dat.go b/unmaintained/fix_dat/fix_dat.go index d6110d870..70bce3bf9 100644 --- a/unmaintained/fix_dat/fix_dat.go +++ b/unmaintained/fix_dat/fix_dat.go @@ -98,7 +98,7 @@ func iterateEntries(datBackend backend.BackendStorageFile, idxFile *os.File, vis // parse index file entry key := util.BytesToUint64(bytes[0:8]) offsetFromIndex := util.BytesToUint32(bytes[8:12]) - sizeFromIndex := util.BytesToUint32(bytes[12:16]) + sizeFromIndex := types.BytesToSize(bytes[12:16]) count, _ = idxFile.ReadAt(bytes, readerOffset) readerOffset += int64(count) @@ -123,7 +123,7 @@ func iterateEntries(datBackend backend.BackendStorageFile, idxFile *os.File, vis } }() - if n.Size <= n.DataSize { + if n.Size <= types.Size(n.DataSize) { continue } visitNeedle(n, offset) |
