mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-09-24 16:03:43 +08:00
Merge pull request #13396 from ioito/hotfix/qx-sparse-file
fix(host): sparse file seek
This commit is contained in:
@@ -87,7 +87,7 @@ func (self *SparseFileReader) Read(p []byte) (int, error) {
|
||||
if err != nil {
|
||||
return int(n), err
|
||||
}
|
||||
self.realReadLen += int64(n)
|
||||
self.realReadLen = int64(n)
|
||||
}
|
||||
}
|
||||
return self.file.Read(p)
|
||||
@@ -207,7 +207,7 @@ func (self *SparseFileWrite) Write(p []byte) (int, error) {
|
||||
if err != nil {
|
||||
return int(n), err
|
||||
}
|
||||
self.bodyWriteLen += int64(n)
|
||||
self.bodyWriteLen = int64(n)
|
||||
}
|
||||
}
|
||||
return self.f.Write(p)
|
||||
|
||||
Reference in New Issue
Block a user