diff options
| -rw-r--r-- | pathfs_frontend/file.go | 4 | 
1 files changed, 2 insertions, 2 deletions
diff --git a/pathfs_frontend/file.go b/pathfs_frontend/file.go index 43114b2..47f935b 100644 --- a/pathfs_frontend/file.go +++ b/pathfs_frontend/file.go @@ -273,8 +273,8 @@ func (f *file) Truncate(newSize uint64) fuse.Status {  		// File shrinks  	} else {  		blockNo := f.cfs.BlockNoPlainOff(newSize) -		lastBlockOff := blockNo * f.cfs.PlainBS() -		lastBlockLen := newSize - lastBlockOff +		lastBlockOff := blockNo * f.cfs.CipherBS() +		lastBlockLen := newSize - blockNo * f.cfs.PlainBS()  		var data []byte  		if lastBlockLen > 0 {  			var status fuse.Status  | 
