diff options
author | n-peugnet <n.peugnet@free.fr> | 2021-09-13 10:52:26 +0200 |
---|---|---|
committer | n-peugnet <n.peugnet@free.fr> | 2021-09-13 10:53:48 +0200 |
commit | 4168e8c6ed41fa4cb53dfded67caed79a82e8789 (patch) | |
tree | 95b970fc2da9ff6cd32710e28c56a31494a6d749 /chunk.go | |
parent | 13e45db0878bc2dc36ad4578c0758dd05879cded (diff) | |
download | dna-backup-4168e8c6ed41fa4cb53dfded67caed79a82e8789.tar.gz dna-backup-4168e8c6ed41fa4cb53dfded67caed79a82e8789.zip |
add read write wrappers to compress chunks' content
Diffstat (limited to 'chunk.go')
-rw-r--r-- | chunk.go | 9 |
1 files changed, 1 insertions, 8 deletions
@@ -4,8 +4,6 @@ import ( "bytes" "fmt" "io" - "log" - "os" "path" ) @@ -87,12 +85,7 @@ func (c *StoredChunk) Reader() io.ReadSeeker { } func (c *StoredChunk) Len() int { - path := c.Id.Path(c.repo.path) - info, err := os.Stat(path) - if err != nil { - log.Println("Chunk: could not stat file:", path) - } - return int(info.Size()) + return c.repo.chunkSize } func NewTempChunk(value []byte) *TempChunk { |