aboutsummaryrefslogtreecommitdiff
path: root/pathfs_frontend/file_holes.go
diff options
context:
space:
mode:
Diffstat (limited to 'pathfs_frontend/file_holes.go')
-rw-r--r--pathfs_frontend/file_holes.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/pathfs_frontend/file_holes.go b/pathfs_frontend/file_holes.go
index db27805..f906aa6 100644
--- a/pathfs_frontend/file_holes.go
+++ b/pathfs_frontend/file_holes.go
@@ -2,6 +2,7 @@ package pathfs_frontend
import (
"github.com/hanwen/go-fuse/fuse"
+ "github.com/rfjakob/gocryptfs/cryptfs"
)
// Will a write to offset "off" create a file hole?
@@ -19,6 +20,7 @@ func (f *file) zeroPad(plainSize uint64) fuse.Status {
lastBlockLen := plainSize % f.cfs.PlainBS()
missing := f.cfs.PlainBS() - lastBlockLen
pad := make([]byte, missing)
+ cryptfs.Debug.Printf("zeroPad: Writing %d bytes\n", missing)
_, status := f.doWrite(pad, int64(plainSize))
return status
}